47 #ifndef vtkPerspectiveTransform_h
48 #define vtkPerspectiveTransform_h
79 void AdjustViewport(
double oldXMin,
double oldXMax,
80 double oldYMin,
double oldYMax,
81 double newXMin,
double newXMax,
82 double newYMin,
double newYMax);
91 void AdjustZBuffer(
double oldNearZ,
double oldFarZ,
92 double newNearZ,
double newFarZ);
99 void Ortho(
double xmin,
double xmax,
double ymin,
double ymax,
100 double znear,
double zfar);
108 void Frustum(
double xmin,
double xmax,
double ymin,
double ymax,
109 double znear,
double zfar);
116 void Perspective(
double angle,
double aspect,
double znear,
double zfar);
128 void Shear(
double dxdz,
double dydz,
double zplane);
137 void Stereo(
double angle,
double focaldistance);
143 void SetupCamera(
const double position[3],
const double focalpoint[3],
144 const double viewup[3]);
147 void SetupCamera(
double p0,
double p1,
double p2,
148 double fp0,
double fp1,
double fp2,
149 double vup0,
double vup1,
double vup2);
155 this->Concatenation->Translate(x,y,z); };
165 void RotateWXYZ(
double angle,
double x,
double y,
double z) {
166 this->Concatenation->Rotate(angle,x,y,z); };
168 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]); };
170 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]); };
177 void RotateX(
double angle) { this->RotateWXYZ(angle, 1, 0, 0); };
178 void RotateY(
double angle) { this->RotateWXYZ(angle, 0, 1, 0); };
179 void RotateZ(
double angle) { this->RotateWXYZ(angle, 0, 0, 1); };
186 void Scale(
double x,
double y,
double z) {
187 this->Concatenation->Scale(x,y,z); };
188 void Scale(
const double s[3]) { this->
Scale(s[0], s[1], s[2]); };
189 void Scale(
const float s[3]) { this->
Scale(s[0], s[1], s[2]); };
196 this->SetMatrix(*matrix->
Element); };
198 this->Identity(); this->Concatenate(elements); };
205 this->Concatenate(*matrix->
Element); };
207 this->Concatenation->Concatenate(elements); };
224 if (this->Concatenation->GetPreMultiplyFlag()) {
return; }
225 this->Concatenation->SetPreMultiplyFlag(1); this->
Modified(); };
235 if (!this->Concatenation->GetPreMultiplyFlag()) {
return; }
236 this->Concatenation->SetPreMultiplyFlag(0); this->
Modified(); };
243 return this->Concatenation->GetNumberOfTransforms() +
244 (this->Input == NULL ? 0 : 1); };
256 if (this->Input == NULL)
258 t=this->Concatenation->GetTransform(i);
260 else if (i < this->Concatenation->GetNumberOfPreTransforms())
262 t=this->Concatenation->GetTransform(i);
264 else if (i > this->Concatenation->GetNumberOfPreTransforms())
266 t=this->Concatenation->GetTransform(i-1);
268 else if (this->GetInverseFlag())
297 return this->Concatenation->GetInverseFlag(); };
302 void Push() {
if (this->Stack == NULL) {
304 this->Stack->Push(&this->Concatenation);
311 void Pop() {
if (this->Stack == NULL) {
return; }
312 this->Stack->Pop(&this->Concatenation);
represent and manipulate 4x4 transformation matrices
a simple class to control print indentation