54#ifndef vtkPerspectiveTransform_h
55#define vtkPerspectiveTransform_h
57#include "vtkCommonTransformsModule.h"
76 this->Concatenation->Identity();
87 this->Concatenation->Inverse();
99 void AdjustViewport(
double oldXMin,
double oldXMax,
double oldYMin,
double oldYMax,
100 double newXMin,
double newXMax,
double newYMin,
double newYMax);
109 void AdjustZBuffer(
double oldNearZ,
double oldFarZ,
double newNearZ,
double newFarZ);
116 void Ortho(
double xmin,
double xmax,
double ymin,
double ymax,
double znear,
double zfar);
124 void Frustum(
double xmin,
double xmax,
double ymin,
double ymax,
double znear,
double zfar);
132 void Perspective(
double angle,
double aspect,
double znear,
double zfar);
147 void Shear(
double dxdz,
double dydz,
double zplane);
159 void Stereo(
double angle,
double focaldistance);
168 void SetupCamera(
double p0,
double p1,
double p2,
double fp0,
double fp1,
double fp2,
double vup0,
169 double vup1,
double vup2);
176 void Translate(
double x,
double y,
double z) { this->Concatenation->Translate(x, y, z); }
190 this->Concatenation->Rotate(angle, x, y, z);
194 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]);
198 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]);
208 void RotateX(
double angle) { this->RotateWXYZ(angle, 1, 0, 0); }
209 void RotateY(
double angle) { this->RotateWXYZ(angle, 0, 1, 0); }
210 void RotateZ(
double angle) { this->RotateWXYZ(angle, 0, 0, 1); }
219 void Scale(
double x,
double y,
double z) { this->Concatenation->Scale(x, y, z); }
220 void Scale(
const double s[3]) { this->
Scale(s[0], s[1], s[2]); }
221 void Scale(
const float s[3]) { this->
Scale(s[0], s[1], s[2]); }
233 this->Concatenate(elements);
243 void Concatenate(
const double elements[16]) { this->Concatenation->Concatenate(elements); }
264 if (this->Concatenation->GetPreMultiplyFlag())
268 this->Concatenation->SetPreMultiplyFlag(1);
281 if (!this->Concatenation->GetPreMultiplyFlag())
285 this->Concatenation->SetPreMultiplyFlag(0);
295 return this->Concatenation->GetNumberOfTransforms() + (this->Input ==
nullptr ? 0 : 1);
309 if (this->Input ==
nullptr)
311 t = this->Concatenation->GetTransform(i);
313 else if (i < this->Concatenation->GetNumberOfPreTransforms())
315 t = this->Concatenation->GetTransform(i);
317 else if (i > this->Concatenation->GetNumberOfPreTransforms())
319 t = this->Concatenation->GetTransform(i - 1);
321 else if (this->GetInverseFlag())
361 if (this->Stack ==
nullptr)
365 this->Stack->Push(&this->Concatenation);
377 if (this->Stack ==
nullptr)
381 this->Stack->Pop(&this->Concatenation);
a simple class to control print indentation
represent and manipulate 4x4 transformation matrices
double Element[4][4]
The internal data is public for historical reasons. Do not use!
virtual void Modified()
Update the modification time for this object.
vtkTypeUInt32 vtkMTimeType