51 #ifndef vtkTransform_h
52 #define vtkTransform_h
80 this->Concatenation->Translate(x,y,z); };
90 void RotateWXYZ(
double angle,
double x,
double y,
double z) {
91 this->Concatenation->Rotate(angle,x,y,z); };
93 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]); };
95 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]); };
102 void RotateX(
double angle) { this->RotateWXYZ(angle, 1, 0, 0); };
103 void RotateY(
double angle) { this->RotateWXYZ(angle, 0, 1, 0); };
104 void RotateZ(
double angle) { this->RotateWXYZ(angle, 0, 0, 1); };
111 void Scale(
double x,
double y,
double z) {
112 this->Concatenation->Scale(x,y,z); };
113 void Scale(
const double s[3]) { this->
Scale(s[0], s[1], s[2]); };
114 void Scale(
const float s[3]) { this->
Scale(s[0], s[1], s[2]); };
121 this->SetMatrix(*matrix->
Element); };
123 this->Concatenation->Identity(); this->Concatenate(elements); };
130 this->Concatenate(*matrix->
Element); };
132 this->Concatenation->Concatenate(elements); };
149 if (this->Concatenation->GetPreMultiplyFlag()) {
return; }
150 this->Concatenation->SetPreMultiplyFlag(1); this->
Modified(); };
160 if (!this->Concatenation->GetPreMultiplyFlag()) {
return; }
161 this->Concatenation->SetPreMultiplyFlag(0); this->
Modified(); };
168 return this->Concatenation->GetNumberOfTransforms() +
169 (this->Input == NULL ? 0 : 1); };
181 if (this->Input == NULL)
183 t=this->Concatenation->GetTransform(i);
185 else if (i < this->Concatenation->GetNumberOfPreTransforms())
187 t=this->Concatenation->GetTransform(i);
189 else if (i > this->Concatenation->GetNumberOfPreTransforms())
191 t=this->Concatenation->GetTransform(i-1);
193 else if (this->GetInverseFlag())
208 void GetOrientation(
double orient[3]);
210 double temp[3]; this->GetOrientation(temp);
211 orient[0] =
static_cast<float>(temp[0]);
212 orient[1] =
static_cast<float>(temp[1]);
213 orient[2] =
static_cast<float>(temp[2]); };
215 this->GetOrientation(this->ReturnValue);
return this->ReturnValue; };
220 static void GetOrientation(
double orient[3],
vtkMatrix4x4 *matrix);
225 void GetOrientationWXYZ(
double wxyz[4]);
227 double temp[4]; this->GetOrientationWXYZ(temp);
228 wxyz[0]=
static_cast<float>(temp[0]);
229 wxyz[1]=
static_cast<float>(temp[1]);
230 wxyz[2]=
static_cast<float>(temp[2]);
231 wxyz[3]=
static_cast<float>(temp[3]);};
233 this->GetOrientationWXYZ(this->ReturnValue);
return this->ReturnValue; };
240 void GetPosition(
double pos[3]);
242 double temp[3]; this->GetPosition(temp);
243 pos[0] =
static_cast<float>(temp[0]);
244 pos[1] =
static_cast<float>(temp[1]);
245 pos[2] =
static_cast<float>(temp[2]); };
247 this->GetPosition(this->ReturnValue);
return this->ReturnValue; };
255 void GetScale(
double scale[3]);
257 double temp[3]; this->GetScale(temp);
258 scale[0] =
static_cast<float>(temp[0]);
259 scale[1] =
static_cast<float>(temp[1]);
260 scale[2] =
static_cast<float>(temp[2]); };
262 this->GetScale(this->ReturnValue);
return this->ReturnValue; };
291 return this->Concatenation->GetInverseFlag(); };
296 void Push() {
if (this->Stack == NULL) {
298 this->Stack->Push(&this->Concatenation);
305 void Pop() {
if (this->Stack == NULL) {
return; }
306 this->Stack->Pop(&this->Concatenation);
356 double DoublePoint[4];
357 double ReturnValue[4];
represent and manipulate 4x4 transformation matrices
void MultiplyPoint(const float in[4], float out[4])
a simple class to control print indentation