52 #ifndef vtkTransform_h 53 #define vtkTransform_h 55 #include "vtkCommonTransformsModule.h" 87 this->Concatenation->Translate(x,y,z); };
99 void RotateWXYZ(
double angle,
double x,
double y,
double z) {
100 this->Concatenation->Rotate(angle,x,y,z); };
102 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]); };
104 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]); };
113 void RotateX(
double angle) { this->RotateWXYZ(angle, 1, 0, 0); };
114 void RotateY(
double angle) { this->RotateWXYZ(angle, 0, 1, 0); };
115 void RotateZ(
double angle) { this->RotateWXYZ(angle, 0, 0, 1); };
124 void Scale(
double x,
double y,
double z) {
125 this->Concatenation->Scale(x,y,z); };
126 void Scale(
const double s[3]) { this->
Scale(s[0], s[1], s[2]); };
127 void Scale(
const float s[3]) { this->
Scale(s[0], s[1], s[2]); };
136 this->SetMatrix(*matrix->
Element); };
138 this->Concatenation->Identity(); this->Concatenate(elements); };
147 this->Concatenate(*matrix->
Element); };
149 this->Concatenation->Concatenate(elements); };
169 if (this->Concatenation->GetPreMultiplyFlag()) {
return; }
170 this->Concatenation->SetPreMultiplyFlag(1); this->
Modified(); };
180 if (!this->Concatenation->GetPreMultiplyFlag()) {
return; }
181 this->Concatenation->SetPreMultiplyFlag(0); this->
Modified(); };
188 return this->Concatenation->GetNumberOfTransforms() +
189 (this->Input ==
nullptr ? 0 : 1); };
202 if (this->Input ==
nullptr)
204 t=this->Concatenation->GetTransform(i);
206 else if (i < this->Concatenation->GetNumberOfPreTransforms())
208 t=this->Concatenation->GetTransform(i);
210 else if (i > this->Concatenation->GetNumberOfPreTransforms())
212 t=this->Concatenation->GetTransform(i-1);
214 else if (this->GetInverseFlag())
231 void GetOrientation(
double orient[3]);
233 double temp[3]; this->GetOrientation(temp);
234 orient[0] =
static_cast<float>(temp[0]);
235 orient[1] =
static_cast<float>(temp[1]);
236 orient[2] =
static_cast<float>(temp[2]); };
238 this->GetOrientation(this->ReturnValue);
return this->ReturnValue; };
245 static void GetOrientation(
double orient[3],
vtkMatrix4x4 *matrix);
252 void GetOrientationWXYZ(
double wxyz[4]);
254 double temp[4]; this->GetOrientationWXYZ(temp);
255 wxyz[0]=
static_cast<float>(temp[0]);
256 wxyz[1]=
static_cast<float>(temp[1]);
257 wxyz[2]=
static_cast<float>(temp[2]);
258 wxyz[3]=
static_cast<float>(temp[3]);};
260 this->GetOrientationWXYZ(this->ReturnValue);
return this->ReturnValue; };
269 void GetPosition(
double pos[3]);
271 double temp[3]; this->GetPosition(temp);
272 pos[0] =
static_cast<float>(temp[0]);
273 pos[1] =
static_cast<float>(temp[1]);
274 pos[2] =
static_cast<float>(temp[2]); };
276 this->GetPosition(this->ReturnValue);
return this->ReturnValue; };
286 void GetScale(
double scale[3]);
288 double temp[3]; this->GetScale(temp);
289 scale[0] =
static_cast<float>(temp[0]);
290 scale[1] =
static_cast<float>(temp[1]);
291 scale[2] =
static_cast<float>(temp[2]); };
293 this->GetScale(this->ReturnValue);
return this->ReturnValue; };
330 return this->Concatenation->GetInverseFlag(); };
336 void Push() {
if (this->Stack ==
nullptr) {
338 this->Stack->Push(&this->Concatenation);
347 void Pop() {
if (this->Stack ==
nullptr) {
return; }
348 this->Stack->Pop(&this->Concatenation);
406 double DoublePoint[4];
407 double ReturnValue[4];
represent and manipulate 4x4 transformation matrices
vtkTypeUInt32 vtkMTimeType
void MultiplyPoint(const float in[4], float out[4])
Multiply a homogeneous coordinate by this matrix, i.e.
a simple class to control print indentation
virtual void Modified()
Update the modification time for this object.
#define VTK_SIZEHINT(...)
double Element[4][4]
The internal data is public for historical reasons. Do not use!
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...