52 #ifndef vtkTransform_h
53 #define vtkTransform_h
55 #include "vtkCommonTransformsModule.h"
86 void Translate(
double x,
double y,
double z) { this->Concatenation->Translate(x, y, z); }
98 void RotateWXYZ(
double angle,
double x,
double y,
double z)
100 this->Concatenation->Rotate(angle, x, y, z);
104 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]);
108 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]);
118 void RotateX(
double angle) { this->RotateWXYZ(angle, 1, 0, 0); }
119 void RotateY(
double angle) { this->RotateWXYZ(angle, 0, 1, 0); }
120 void RotateZ(
double angle) { this->RotateWXYZ(angle, 0, 0, 1); }
129 void Scale(
double x,
double y,
double z) { this->Concatenation->Scale(x, y, z); }
130 void Scale(
const double s[3]) { this->
Scale(s[0], s[1], s[2]); }
131 void Scale(
const float s[3]) { this->
Scale(s[0], s[1], s[2]); }
142 this->Concatenation->Identity();
143 this->Concatenate(elements);
153 void Concatenate(
const double elements[16]) { this->Concatenation->Concatenate(elements); }
174 if (this->Concatenation->GetPreMultiplyFlag())
178 this->Concatenation->SetPreMultiplyFlag(1);
191 if (!this->Concatenation->GetPreMultiplyFlag())
195 this->Concatenation->SetPreMultiplyFlag(0);
205 return this->Concatenation->GetNumberOfTransforms() + (this->Input ==
nullptr ? 0 : 1);
219 if (this->Input ==
nullptr)
221 t = this->Concatenation->GetTransform(i);
223 else if (i < this->Concatenation->GetNumberOfPreTransforms())
225 t = this->Concatenation->GetTransform(i);
227 else if (i > this->Concatenation->GetNumberOfPreTransforms())
229 t = this->Concatenation->GetTransform(i - 1);
231 else if (this->GetInverseFlag())
248 void GetOrientation(
double orient[3]);
252 this->GetOrientation(temp);
253 orient[0] =
static_cast<float>(temp[0]);
254 orient[1] =
static_cast<float>(temp[1]);
255 orient[2] =
static_cast<float>(temp[2]);
259 this->GetOrientation(this->ReturnValue);
260 return this->ReturnValue;
268 static void GetOrientation(
double orient[3],
vtkMatrix4x4* matrix);
275 void GetOrientationWXYZ(
double wxyz[4]);
279 this->GetOrientationWXYZ(temp);
280 wxyz[0] =
static_cast<float>(temp[0]);
281 wxyz[1] =
static_cast<float>(temp[1]);
282 wxyz[2] =
static_cast<float>(temp[2]);
283 wxyz[3] =
static_cast<float>(temp[3]);
287 this->GetOrientationWXYZ(this->ReturnValue);
288 return this->ReturnValue;
298 void GetPosition(
double pos[3]);
302 this->GetPosition(temp);
303 pos[0] =
static_cast<float>(temp[0]);
304 pos[1] =
static_cast<float>(temp[1]);
305 pos[2] =
static_cast<float>(temp[2]);
309 this->GetPosition(this->ReturnValue);
310 return this->ReturnValue;
321 void GetScale(
double scale[3]);
325 this->GetScale(temp);
326 scale[0] =
static_cast<float>(temp[0]);
327 scale[1] =
static_cast<float>(temp[1]);
328 scale[2] =
static_cast<float>(temp[2]);
332 this->GetScale(this->ReturnValue);
333 return this->ReturnValue;
378 if (this->Stack ==
nullptr)
382 this->Stack->Push(&this->Concatenation);
394 if (this->Stack ==
nullptr)
398 this->Stack->Pop(&this->Concatenation);
457 double DoublePoint[4];
458 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...