49 #ifndef vtkTransform_h
50 #define vtkTransform_h
52 #include "vtkCommonTransformsModule.h"
57 VTK_ABI_NAMESPACE_BEGIN
84 void Translate(
double x,
double y,
double z) { this->Concatenation->Translate(x, y, z); }
96 void RotateWXYZ(
double angle,
double x,
double y,
double z)
98 this->Concatenation->Rotate(angle, x, y, z);
102 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]);
106 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]);
116 void RotateX(
double angle) { this->RotateWXYZ(angle, 1, 0, 0); }
117 void RotateY(
double angle) { this->RotateWXYZ(angle, 0, 1, 0); }
118 void RotateZ(
double angle) { this->RotateWXYZ(angle, 0, 0, 1); }
127 void Scale(
double x,
double y,
double z) { this->Concatenation->Scale(x, y, z); }
128 void Scale(
const double s[3]) { this->
Scale(s[0], s[1], s[2]); }
129 void Scale(
const float s[3]) { this->
Scale(s[0], s[1], s[2]); }
140 this->Concatenation->Identity();
141 this->Concatenate(elements);
151 void Concatenate(
const double elements[16]) { this->Concatenation->Concatenate(elements); }
172 if (this->Concatenation->GetPreMultiplyFlag())
176 this->Concatenation->SetPreMultiplyFlag(1);
189 if (!this->Concatenation->GetPreMultiplyFlag())
193 this->Concatenation->SetPreMultiplyFlag(0);
203 return this->Concatenation->GetNumberOfTransforms() + (this->Input ==
nullptr ? 0 : 1);
217 if (this->Input ==
nullptr)
219 t = this->Concatenation->GetTransform(i);
221 else if (i < this->Concatenation->GetNumberOfPreTransforms())
223 t = this->Concatenation->GetTransform(i);
225 else if (i > this->Concatenation->GetNumberOfPreTransforms())
227 t = this->Concatenation->GetTransform(i - 1);
229 else if (this->GetInverseFlag())
250 this->GetOrientation(temp);
251 orient[0] =
static_cast<float>(temp[0]);
252 orient[1] =
static_cast<float>(temp[1]);
253 orient[2] =
static_cast<float>(temp[2]);
257 this->GetOrientation(this->ReturnValue);
258 return this->ReturnValue;
277 this->GetOrientationWXYZ(temp);
278 wxyz[0] =
static_cast<float>(temp[0]);
279 wxyz[1] =
static_cast<float>(temp[1]);
280 wxyz[2] =
static_cast<float>(temp[2]);
281 wxyz[3] =
static_cast<float>(temp[3]);
285 this->GetOrientationWXYZ(this->ReturnValue);
286 return this->ReturnValue;
300 this->GetPosition(temp);
301 pos[0] =
static_cast<float>(temp[0]);
302 pos[1] =
static_cast<float>(temp[1]);
303 pos[2] =
static_cast<float>(temp[2]);
307 this->GetPosition(this->ReturnValue);
308 return this->ReturnValue;
323 this->GetScale(temp);
324 scale[0] =
static_cast<float>(temp[0]);
325 scale[1] =
static_cast<float>(temp[1]);
326 scale[2] =
static_cast<float>(temp[2]);
330 this->GetScale(this->ReturnValue);
331 return this->ReturnValue;
376 if (this->Stack ==
nullptr)
380 this->Stack->Push(&this->Concatenation);
392 if (this->Stack ==
nullptr)
396 this->Stack->Pop(&this->Concatenation);
455 double DoublePoint[4];
456 double ReturnValue[4];
463 VTK_ABI_NAMESPACE_END
a simple class to control print indentation
represent and manipulate 4x4 transformation matrices
void MultiplyPoint(const float in[4], float out[4])
Multiply a homogeneous coordinate by this matrix, i.e.
double Element[4][4]
The internal data is public for historical reasons. Do not use!
virtual void Modified()
Update the modification time for this object.
vtkTypeUInt32 vtkMTimeType
#define VTK_SIZEHINT(...)