40 #ifndef vtkTransform_h
41 #define vtkTransform_h
43 #include "vtkCommonTransformsModule.h"
49 VTK_ABI_NAMESPACE_BEGIN
76 void Translate(
double x,
double y,
double z) { this->Concatenation->Translate(x, y, z); }
88 void RotateWXYZ(
double angle,
double x,
double y,
double z)
90 this->Concatenation->Rotate(angle, x, y, z);
94 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]);
98 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]);
108 void RotateX(
double angle) { this->RotateWXYZ(angle, 1, 0, 0); }
109 void RotateY(
double angle) { this->RotateWXYZ(angle, 0, 1, 0); }
110 void RotateZ(
double angle) { this->RotateWXYZ(angle, 0, 0, 1); }
119 void Scale(
double x,
double y,
double z) { this->Concatenation->Scale(x, y, z); }
120 void Scale(
const double s[3]) { this->
Scale(s[0], s[1], s[2]); }
121 void Scale(
const float s[3]) { this->
Scale(s[0], s[1], s[2]); }
132 this->Concatenation->Identity();
133 this->Concatenate(elements);
143 void Concatenate(
const double elements[16]) { this->Concatenation->Concatenate(elements); }
164 if (this->Concatenation->GetPreMultiplyFlag())
168 this->Concatenation->SetPreMultiplyFlag(1);
181 if (!this->Concatenation->GetPreMultiplyFlag())
185 this->Concatenation->SetPreMultiplyFlag(0);
195 return this->Concatenation->GetNumberOfTransforms() + (this->Input ==
nullptr ? 0 : 1);
209 if (this->Input ==
nullptr)
211 t = this->Concatenation->GetTransform(i);
213 else if (i < this->Concatenation->GetNumberOfPreTransforms())
215 t = this->Concatenation->GetTransform(i);
217 else if (i > this->Concatenation->GetNumberOfPreTransforms())
219 t = this->Concatenation->GetTransform(i - 1);
221 else if (this->GetInverseFlag())
238 void GetOrientation(
double orient[3]);
242 this->GetOrientation(temp);
243 orient[0] =
static_cast<float>(temp[0]);
244 orient[1] =
static_cast<float>(temp[1]);
245 orient[2] =
static_cast<float>(temp[2]);
249 this->GetOrientation(this->ReturnValue);
250 return this->ReturnValue;
258 static void GetOrientation(
double orient[3],
vtkMatrix4x4* matrix);
265 void GetOrientationWXYZ(
double wxyz[4]);
269 this->GetOrientationWXYZ(temp);
270 wxyz[0] =
static_cast<float>(temp[0]);
271 wxyz[1] =
static_cast<float>(temp[1]);
272 wxyz[2] =
static_cast<float>(temp[2]);
273 wxyz[3] =
static_cast<float>(temp[3]);
277 this->GetOrientationWXYZ(this->ReturnValue);
278 return this->ReturnValue;
288 void GetPosition(
double pos[3]);
292 this->GetPosition(temp);
293 pos[0] =
static_cast<float>(temp[0]);
294 pos[1] =
static_cast<float>(temp[1]);
295 pos[2] =
static_cast<float>(temp[2]);
299 this->GetPosition(this->ReturnValue);
300 return this->ReturnValue;
311 void GetScale(
double scale[3]);
315 this->GetScale(temp);
316 scale[0] =
static_cast<float>(temp[0]);
317 scale[1] =
static_cast<float>(temp[1]);
318 scale[2] =
static_cast<float>(temp[2]);
322 this->GetScale(this->ReturnValue);
323 return this->ReturnValue;
368 if (this->Stack ==
nullptr)
372 this->Stack->Push(&this->Concatenation);
384 if (this->Stack ==
nullptr)
388 this->Stack->Pop(&this->Concatenation);
447 double DoublePoint[4];
448 double ReturnValue[4];
455 VTK_ABI_NAMESPACE_END
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
#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...