149#ifndef vtkTransform_h
150#define vtkTransform_h
152#include "vtkCommonTransformsModule.h"
158VTK_ABI_NAMESPACE_BEGIN
185 void Translate(
double x,
double y,
double z) { this->Concatenation->Translate(x, y, z); }
199 this->Concatenation->Rotate(angle, x, y, z);
203 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]);
207 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]);
217 void RotateX(
double angle) { this->RotateWXYZ(angle, 1, 0, 0); }
218 void RotateY(
double angle) { this->RotateWXYZ(angle, 0, 1, 0); }
219 void RotateZ(
double angle) { this->RotateWXYZ(angle, 0, 0, 1); }
228 void Scale(
double x,
double y,
double z) { this->Concatenation->Scale(x, y, z); }
229 void Scale(
const double s[3]) { this->
Scale(s[0], s[1], s[2]); }
230 void Scale(
const float s[3]) { this->
Scale(s[0], s[1], s[2]); }
241 this->Concatenation->Identity();
242 this->Concatenate(elements);
252 void Concatenate(
const double elements[16]) { this->Concatenation->Concatenate(elements); }
273 if (this->Concatenation->GetPreMultiplyFlag())
277 this->Concatenation->SetPreMultiplyFlag(1);
290 if (!this->Concatenation->GetPreMultiplyFlag())
294 this->Concatenation->SetPreMultiplyFlag(0);
304 return this->Concatenation->GetNumberOfTransforms() + (this->Input ==
nullptr ? 0 : 1);
318 if (this->Input ==
nullptr)
320 t = this->Concatenation->GetTransform(i);
322 else if (i < this->Concatenation->GetNumberOfPreTransforms())
324 t = this->Concatenation->GetTransform(i);
326 else if (i > this->Concatenation->GetNumberOfPreTransforms())
328 t = this->Concatenation->GetTransform(i - 1);
330 else if (this->GetInverseFlag())
351 this->GetOrientation(temp);
352 orient[0] =
static_cast<float>(temp[0]);
353 orient[1] =
static_cast<float>(temp[1]);
354 orient[2] =
static_cast<float>(temp[2]);
358 this->GetOrientation(this->ReturnValue);
359 return this->ReturnValue;
378 this->GetOrientationWXYZ(temp);
379 wxyz[0] =
static_cast<float>(temp[0]);
380 wxyz[1] =
static_cast<float>(temp[1]);
381 wxyz[2] =
static_cast<float>(temp[2]);
382 wxyz[3] =
static_cast<float>(temp[3]);
386 this->GetOrientationWXYZ(this->ReturnValue);
387 return this->ReturnValue;
401 this->GetPosition(temp);
402 pos[0] =
static_cast<float>(temp[0]);
403 pos[1] =
static_cast<float>(temp[1]);
404 pos[2] =
static_cast<float>(temp[2]);
408 this->GetPosition(this->ReturnValue);
409 return this->ReturnValue;
424 this->GetScale(temp);
425 scale[0] =
static_cast<float>(temp[0]);
426 scale[1] =
static_cast<float>(temp[1]);
427 scale[2] =
static_cast<float>(temp[2]);
431 this->GetScale(this->ReturnValue);
432 return this->ReturnValue;
477 if (this->Stack ==
nullptr)
481 this->Stack->Push(&this->Concatenation);
493 if (this->Stack ==
nullptr)
497 this->Stack->Pop(&this->Concatenation);
556 double DoublePoint[4];
557 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!
vtkTypeUInt32 vtkMTimeType
#define VTK_SIZEHINT(...)