51 #ifndef __vtkTransform_h
52 #define __vtkTransform_h
79 this->Concatenation->Translate(x,y,z); };
89 void RotateWXYZ(
double angle,
double x,
double y,
double z) {
90 this->Concatenation->Rotate(angle,x,y,z); };
92 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]); };
94 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]); };
101 void RotateX(
double angle) { this->RotateWXYZ(angle, 1, 0, 0); };
102 void RotateY(
double angle) { this->RotateWXYZ(angle, 0, 1, 0); };
103 void RotateZ(
double angle) { this->RotateWXYZ(angle, 0, 0, 1); };
110 void Scale(
double x,
double y,
double z) {
111 this->Concatenation->Scale(x,y,z); };
112 void Scale(
const double s[3]) { this->
Scale(s[0], s[1], s[2]); };
113 void Scale(
const float s[3]) { this->
Scale(s[0], s[1], s[2]); };
120 this->SetMatrix(*matrix->
Element); };
122 this->
Identity(); this->Concatenate(elements); };
129 this->Concatenate(*matrix->
Element); };
131 this->Concatenation->Concatenate(elements); };
148 if (this->Concatenation->GetPreMultiplyFlag()) {
return; }
149 this->Concatenation->SetPreMultiplyFlag(1); this->
Modified(); };
159 if (!this->Concatenation->GetPreMultiplyFlag()) {
return; }
160 this->Concatenation->SetPreMultiplyFlag(0); this->
Modified(); };
167 return this->Concatenation->GetNumberOfTransforms() +
168 (this->Input == NULL ? 0 : 1); };
180 if (this->Input == NULL)
182 t=this->Concatenation->GetTransform(i);
184 else if (i < this->Concatenation->GetNumberOfPreTransforms())
186 t=this->Concatenation->GetTransform(i);
188 else if (i > this->Concatenation->GetNumberOfPreTransforms())
190 t=this->Concatenation->GetTransform(i-1);
192 else if (this->GetInverseFlag())
207 void GetOrientation(
double orient[3]);
209 double temp[3]; this->GetOrientation(temp);
210 orient[0] =
static_cast<float>(temp[0]);
211 orient[1] =
static_cast<float>(temp[1]);
212 orient[2] =
static_cast<float>(temp[2]); };
214 this->GetOrientation(this->ReturnValue);
return this->ReturnValue; };
219 static void GetOrientation(
double orient[3],
vtkMatrix4x4 *matrix);
224 void GetOrientationWXYZ(
double wxyz[4]);
226 double temp[4]; this->GetOrientationWXYZ(temp);
227 wxyz[0]=
static_cast<float>(temp[0]);
228 wxyz[1]=
static_cast<float>(temp[1]);
229 wxyz[2]=
static_cast<float>(temp[2]);
230 wxyz[3]=
static_cast<float>(temp[3]);};
232 this->GetOrientationWXYZ(this->ReturnValue);
return this->ReturnValue; };
239 void GetPosition(
double pos[3]);
241 double temp[3]; this->GetPosition(temp);
242 pos[0] =
static_cast<float>(temp[0]);
243 pos[1] =
static_cast<float>(temp[1]);
244 pos[2] =
static_cast<float>(temp[2]); };
246 this->GetPosition(this->ReturnValue);
return this->ReturnValue; };
254 void GetScale(
double scale[3]);
256 double temp[3]; this->GetScale(temp);
257 scale[0] =
static_cast<float>(temp[0]);
258 scale[1] =
static_cast<float>(temp[1]);
259 scale[2] =
static_cast<float>(temp[2]); };
261 this->GetScale(this->ReturnValue);
return this->ReturnValue; };
290 return this->Concatenation->GetInverseFlag(); };
295 void Push() {
if (this->Stack == NULL) {
297 this->Stack->Push(&this->Concatenation);
304 void Pop() {
if (this->Stack == NULL) {
return; }
305 this->Stack->Pop(&this->Concatenation);
355 double DoublePoint[4];
356 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