46 #ifndef vtkTransform_h 47 #define vtkTransform_h 49 #include "vtkCommonTransformsModule.h" 80 void Translate(
double x,
double y,
double z) {
81 this->Concatenation->Translate(x,y,z); };
93 void RotateWXYZ(
double angle,
double x,
double y,
double z) {
94 this->Concatenation->Rotate(angle,x,y,z); };
96 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]); };
98 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]); };
107 void RotateX(
double angle) { this->RotateWXYZ(angle, 1, 0, 0); };
108 void RotateY(
double angle) { this->RotateWXYZ(angle, 0, 1, 0); };
109 void RotateZ(
double angle) { this->RotateWXYZ(angle, 0, 0, 1); };
118 void Scale(
double x,
double y,
double z) {
119 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]); };
130 this->SetMatrix(*matrix->
Element); };
132 this->Concatenation->Identity(); this->Concatenate(elements); };
141 this->Concatenate(*matrix->
Element); };
143 this->Concatenation->Concatenate(elements); };
163 if (this->Concatenation->GetPreMultiplyFlag()) {
return; }
164 this->Concatenation->SetPreMultiplyFlag(1); this->
Modified(); };
174 if (!this->Concatenation->GetPreMultiplyFlag()) {
return; }
175 this->Concatenation->SetPreMultiplyFlag(0); this->
Modified(); };
182 return this->Concatenation->GetNumberOfTransforms() +
183 (this->Input == NULL ? 0 : 1); };
196 if (this->Input == NULL)
198 t=this->Concatenation->GetTransform(i);
200 else if (i < this->Concatenation->GetNumberOfPreTransforms())
202 t=this->Concatenation->GetTransform(i);
204 else if (i > this->Concatenation->GetNumberOfPreTransforms())
206 t=this->Concatenation->GetTransform(i-1);
208 else if (this->GetInverseFlag())
225 void GetOrientation(
double orient[3]);
227 double temp[3]; this->GetOrientation(temp);
228 orient[0] =
static_cast<float>(temp[0]);
229 orient[1] =
static_cast<float>(temp[1]);
230 orient[2] =
static_cast<float>(temp[2]); };
232 this->GetOrientation(this->ReturnValue);
return this->ReturnValue; };
239 static void GetOrientation(
double orient[3],
vtkMatrix4x4 *matrix);
246 void GetOrientationWXYZ(
double wxyz[4]);
248 double temp[4]; this->GetOrientationWXYZ(temp);
249 wxyz[0]=
static_cast<float>(temp[0]);
250 wxyz[1]=
static_cast<float>(temp[1]);
251 wxyz[2]=
static_cast<float>(temp[2]);
252 wxyz[3]=
static_cast<float>(temp[3]);};
254 this->GetOrientationWXYZ(this->ReturnValue);
return this->ReturnValue; };
263 void GetPosition(
double pos[3]);
265 double temp[3]; this->GetPosition(temp);
266 pos[0] =
static_cast<float>(temp[0]);
267 pos[1] =
static_cast<float>(temp[1]);
268 pos[2] =
static_cast<float>(temp[2]); };
270 this->GetPosition(this->ReturnValue);
return this->ReturnValue; };
280 void GetScale(
double scale[3]);
282 double temp[3]; this->GetScale(temp);
283 scale[0] =
static_cast<float>(temp[0]);
284 scale[1] =
static_cast<float>(temp[1]);
285 scale[2] =
static_cast<float>(temp[2]); };
287 this->GetScale(this->ReturnValue);
return this->ReturnValue; };
324 return this->Concatenation->GetInverseFlag(); };
330 void Push() {
if (this->Stack == NULL) {
332 this->Stack->Push(&this->Concatenation);
341 void Pop() {
if (this->Stack == NULL) {
return; }
342 this->Stack->Pop(&this->Concatenation);
377 void MultiplyPoint(const
float in[4],
float out[4]) {
389 void InternalUpdate() VTK_OVERRIDE;
400 double DoublePoint[4];
401 double ReturnValue[4];
404 void operator=(const
vtkTransform&) VTK_DELETE_FUNCTION;
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.
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...