155#ifndef vtkTransform_h
156#define vtkTransform_h
158#include "vtkCommonTransformsModule.h"
189 void Translate(
double x,
double y,
double z) { this->Concatenation->Translate(x, y, z); }
203 this->Concatenation->Rotate(angle, x, y, z);
207 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]);
211 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]);
221 void RotateX(
double angle) { this->RotateWXYZ(angle, 1, 0, 0); }
222 void RotateY(
double angle) { this->RotateWXYZ(angle, 0, 1, 0); }
223 void RotateZ(
double angle) { this->RotateWXYZ(angle, 0, 0, 1); }
232 void Scale(
double x,
double y,
double z) { this->Concatenation->Scale(x, y, z); }
233 void Scale(
const double s[3]) { this->
Scale(s[0], s[1], s[2]); }
234 void Scale(
const float s[3]) { this->
Scale(s[0], s[1], s[2]); }
245 this->Concatenation->Identity();
246 this->Concatenate(elements);
256 void Concatenate(
const double elements[16]) { this->Concatenation->Concatenate(elements); }
277 if (this->Concatenation->GetPreMultiplyFlag())
281 this->Concatenation->SetPreMultiplyFlag(1);
294 if (!this->Concatenation->GetPreMultiplyFlag())
298 this->Concatenation->SetPreMultiplyFlag(0);
308 return this->Concatenation->GetNumberOfTransforms() + (this->Input ==
nullptr ? 0 : 1);
322 if (this->Input ==
nullptr)
324 t = this->Concatenation->GetTransform(i);
326 else if (i < this->Concatenation->GetNumberOfPreTransforms())
328 t = this->Concatenation->GetTransform(i);
330 else if (i > this->Concatenation->GetNumberOfPreTransforms())
332 t = this->Concatenation->GetTransform(i - 1);
334 else if (this->GetInverseFlag())
355 this->GetOrientation(temp);
356 orient[0] =
static_cast<float>(temp[0]);
357 orient[1] =
static_cast<float>(temp[1]);
358 orient[2] =
static_cast<float>(temp[2]);
362 this->GetOrientation(this->ReturnValue);
363 return this->ReturnValue;
382 this->GetOrientationWXYZ(temp);
383 wxyz[0] =
static_cast<float>(temp[0]);
384 wxyz[1] =
static_cast<float>(temp[1]);
385 wxyz[2] =
static_cast<float>(temp[2]);
386 wxyz[3] =
static_cast<float>(temp[3]);
390 this->GetOrientationWXYZ(this->ReturnValue);
391 return this->ReturnValue;
405 this->GetPosition(temp);
406 pos[0] =
static_cast<float>(temp[0]);
407 pos[1] =
static_cast<float>(temp[1]);
408 pos[2] =
static_cast<float>(temp[2]);
412 this->GetPosition(this->ReturnValue);
413 return this->ReturnValue;
428 this->GetScale(temp);
429 scale[0] =
static_cast<float>(temp[0]);
430 scale[1] =
static_cast<float>(temp[1]);
431 scale[2] =
static_cast<float>(temp[2]);
435 this->GetScale(this->ReturnValue);
436 return this->ReturnValue;
481 if (this->Stack ==
nullptr)
485 this->Stack->Push(&this->Concatenation);
497 if (this->Stack ==
nullptr)
501 this->Stack->Pop(&this->Concatenation);
560 double DoublePoint[4];
561 double ReturnValue[4];
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(...)