57#ifndef vtkPerspectiveTransform_h
58#define vtkPerspectiveTransform_h
60#include "vtkCommonTransformsModule.h"
79 this->Concatenation->Identity();
90 this->Concatenation->Inverse();
102 void AdjustViewport(
double oldXMin,
double oldXMax,
double oldYMin,
double oldYMax,
103 double newXMin,
double newXMax,
double newYMin,
double newYMax);
112 void AdjustZBuffer(
double oldNearZ,
double oldFarZ,
double newNearZ,
double newFarZ);
119 void Ortho(
double xmin,
double xmax,
double ymin,
double ymax,
double znear,
double zfar);
127 void Frustum(
double xmin,
double xmax,
double ymin,
double ymax,
double znear,
double zfar);
135 void Perspective(
double angle,
double aspect,
double znear,
double zfar);
150 void Shear(
double dxdz,
double dydz,
double zplane);
162 void Stereo(
double angle,
double focaldistance);
169 void SetupCamera(
const double position[3],
const double focalpoint[3],
const double viewup[3]);
171 void SetupCamera(
double p0,
double p1,
double p2,
double fp0,
double fp1,
double fp2,
double vup0,
172 double vup1,
double vup2);
179 void Translate(
double x,
double y,
double z) { this->Concatenation->Translate(x, y, z); }
193 this->Concatenation->Rotate(angle, x, y, z);
197 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]);
201 this->RotateWXYZ(angle, axis[0], axis[1], axis[2]);
211 void RotateX(
double angle) { this->RotateWXYZ(angle, 1, 0, 0); }
212 void RotateY(
double angle) { this->RotateWXYZ(angle, 0, 1, 0); }
213 void RotateZ(
double angle) { this->RotateWXYZ(angle, 0, 0, 1); }
222 void Scale(
double x,
double y,
double z) { this->Concatenation->Scale(x, y, z); }
223 void Scale(
const double s[3]) { this->
Scale(s[0], s[1], s[2]); }
224 void Scale(
const float s[3]) { this->
Scale(s[0], s[1], s[2]); }
236 this->Concatenate(elements);
246 void Concatenate(
const double elements[16]) { this->Concatenation->Concatenate(elements); }
267 if (this->Concatenation->GetPreMultiplyFlag())
271 this->Concatenation->SetPreMultiplyFlag(1);
284 if (!this->Concatenation->GetPreMultiplyFlag())
288 this->Concatenation->SetPreMultiplyFlag(0);
298 return this->Concatenation->GetNumberOfTransforms() + (this->Input ==
nullptr ? 0 : 1);
312 if (this->Input ==
nullptr)
314 t = this->Concatenation->GetTransform(i);
316 else if (i < this->Concatenation->GetNumberOfPreTransforms())
318 t = this->Concatenation->GetTransform(i);
320 else if (i > this->Concatenation->GetNumberOfPreTransforms())
322 t = this->Concatenation->GetTransform(i - 1);
324 else if (this->GetInverseFlag())
364 if (this->Stack ==
nullptr)
368 this->Stack->Push(&this->Concatenation);
380 if (this->Stack ==
nullptr)
384 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