47 #ifndef __vtkPerspectiveTransform_h
48 #define __vtkPerspectiveTransform_h
78 void AdjustViewport(
double oldXMin,
double oldXMax,
79 double oldYMin,
double oldYMax,
80 double newXMin,
double newXMax,
81 double newYMin,
double newYMax);
90 void AdjustZBuffer(
double oldNearZ,
double oldFarZ,
91 double newNearZ,
double newFarZ);
98 void Ortho(
double xmin,
double xmax,
double ymin,
double ymax,
99 double znear,
double zfar);
107 void Frustum(
double xmin,
double xmax,
double ymin,
double ymax,
108 double znear,
double zfar);
115 void Perspective(
double angle,
double aspect,
double znear,
double zfar);
127 void Shear(
double dxdz,
double dydz,
double zplane);
136 void Stereo(
double angle,
double focaldistance);
142 void SetupCamera(
const double position[3],
const double focalpoint[3],
143 const double viewup[3]);
146 void SetupCamera(
double p0,
double p1,
double p2,
147 double fp0,
double fp1,
double fp2,
148 double vup0,
double vup1,
double vup2);
154 this->Concatenation->Translate(x,y,z); };
164 void RotateWXYZ(
double angle,
double x,
double y,
double z) {
165 this->Concatenation->Rotate(angle,x,y,z); };
167 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]); };
169 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]); };
176 void RotateX(
double angle) { this->RotateWXYZ(angle, 1, 0, 0); };
177 void RotateY(
double angle) { this->RotateWXYZ(angle, 0, 1, 0); };
178 void RotateZ(
double angle) { this->RotateWXYZ(angle, 0, 0, 1); };
185 void Scale(
double x,
double y,
double z) {
186 this->Concatenation->Scale(x,y,z); };
187 void Scale(
const double s[3]) { this->
Scale(s[0], s[1], s[2]); };
188 void Scale(
const float s[3]) { this->
Scale(s[0], s[1], s[2]); };
195 this->SetMatrix(*matrix->
Element); };
197 this->
Identity(); this->Concatenate(elements); };
204 this->Concatenate(*matrix->
Element); };
206 this->Concatenation->Concatenate(elements); };
223 if (this->Concatenation->GetPreMultiplyFlag()) {
return; }
224 this->Concatenation->SetPreMultiplyFlag(1); this->
Modified(); };
234 if (!this->Concatenation->GetPreMultiplyFlag()) {
return; }
235 this->Concatenation->SetPreMultiplyFlag(0); this->
Modified(); };
242 return this->Concatenation->GetNumberOfTransforms() +
243 (this->Input == NULL ? 0 : 1); };
255 if (this->Input == NULL)
257 t=this->Concatenation->GetTransform(i);
259 else if (i < this->Concatenation->GetNumberOfPreTransforms())
261 t=this->Concatenation->GetTransform(i);
263 else if (i > this->Concatenation->GetNumberOfPreTransforms())
265 t=this->Concatenation->GetTransform(i-1);
267 else if (this->GetInverseFlag())
296 return this->Concatenation->GetInverseFlag(); };
301 void Push() {
if (this->Stack == NULL) {
303 this->Stack->Push(&this->Concatenation);
310 void Pop() {
if (this->Stack == NULL) {
return; }
311 this->Stack->Pop(&this->Concatenation);
represent and manipulate 4x4 transformation matrices
a simple class to control print indentation