#include <vptransform.h>
Inheritance diagram for VPTransform:
Public Member Functions | |
VPTransform () | |
Creates an uninitialized transform. | |
VPTransform (const VPTransform &trans) | |
Copy constructor. | |
void | MakeIdentity () |
Turns transform into identity. | |
VPPoint4D | operator * (const VPPoint4D &point) const |
Applies transformation to a point. | |
VPTransform | operator * (const VPTransform &t) const |
Applies transformation to another transform. | |
VPTransform & | operator= (const VPTransform &t) |
void | ApplyTo (VPPoint4D *ptPoint) const |
Applies tranformation to a point. | |
void | MakeTranslation (const VPPoint4D &translationVector) |
Turns transform into a translation. | |
void | MakeTranslation (double tx, double ty, double tz) |
Turns transform into a translation. | |
void | MakeXRotation (double radians) |
Turns transform into a rotation around the X axis. | |
void | MakeYRotation (double radians) |
Turns transform into a rotation around the Y axis. | |
void | MakeZRotation (double radians) |
Turns transform into a rotation around the Z axis. | |
void | MakeRotation (const VPPoint4D &refVec, const float radians) |
Turns transform into a rotation (around some reference vetor). | |
void | MakeRotation (const VPPoint4D &refPoint, const VPPoint4D &refVec, const float radians) |
Turns transform into a rotation (around some reference axis). | |
void | MakeScale (double sX, double sY, double sZ) |
Turns transform into a scale. | |
void | MakeShear (double shX, double shY) |
Turns transform into a shear. | |
const double * | GetData () const |
Returns the address of transformation matrix. | |
void | GetVectorX (VPPoint4D *result) const |
Returns the X vector of the transform. | |
void | GetVectorY (VPPoint4D *result) const |
Returns the Y vector of the transform. | |
void | GetVectorZ (VPPoint4D *result) const |
Returns the Z vector of the transform. | |
void | GetTranslation (VPPoint4D *result) const |
Returns the translation part of the transform. | |
virtual bool | DrawOGL () const |
Apply transform to rendering engine. | |
Friends | |
std::ostream & | operator<< (std::ostream &output, const VPTransform &t) |
'ostream' class extension to output a transformation on the console. |
A transformation matrix is represented by a 4x4 pre-multiplication matrix, i.e., to apply T1, then T2, then T3, one must multiply T3*T2*T1. Translation values are at the rightmost column.
Definition at line 21 of file vptransform.h.
|
Creates an uninitialized transform.
Definition at line 23 of file vptransform.cpp. |
|
Copy constructor.
Definition at line 27 of file vptransform.cpp. References matrix. |
|
Applies tranformation to a point.
Definition at line 121 of file vptransform.cpp. References VPPoint4D::GetW(), VPPoint4D::GetX(), VPPoint4D::GetY(), VPPoint4D::GetZ(), and VPPoint4D::SetXYZW(). Referenced by VPCamera::MoveForward(), VPCamera::MoveSideways(), VPCamera::MoveUp(), VPCamera::PitchAroundTarget(), VPMeshObject::Transform(), VPDof::Transform(), VPCurve::Transform(), VPCamera::Yaw(), and VPCamera::YawAroundTarget(). |
|
Apply transform to rendering engine.
Reimplemented from VPSceneNode. Definition at line 232 of file vptransform.cpp. References VPSceneNode::childList. |
|
Returns the address of transformation matrix. Use this method to get an OpenGl like transformation matrix, compatible with methods such as "glLoadMatrixd" and "glMultMatrixd". Definition at line 98 of file vptransform.h. |
|
Returns the translation part of the transform.
Definition at line 224 of file vptransform.cpp. References VPPoint4D::SetW(), VPPoint4D::SetX(), VPPoint4D::SetY(), and VPPoint4D::SetZ(). Referenced by VPDof::GetOrigin(). |
|
Returns the X vector of the transform. A rigid transformation matrix may be interpreted as a coordinate system. This method returns the 1st column of the matrix which may be interpreted as the X vector of such coordinate system. Definition at line 200 of file vptransform.cpp. References VPPoint4D::SetW(), VPPoint4D::SetX(), VPPoint4D::SetY(), and VPPoint4D::SetZ(). |
|
Returns the Y vector of the transform. A rigid transformation matrix may be interpreted as a coordinate system. This method returns the 2nd column of the matrix which may be interpreted as the Y vector of such coordinate system. Definition at line 208 of file vptransform.cpp. References VPPoint4D::SetW(), VPPoint4D::SetX(), VPPoint4D::SetY(), and VPPoint4D::SetZ(). |
|
Returns the Z vector of the transform. A rigid transformation matrix may be interpreted as a coordinate system. This method returns the 3rd column of the matrix which may be interpreted as the Z vector of such coordinate system. Definition at line 216 of file vptransform.cpp. References VPPoint4D::SetW(), VPPoint4D::SetX(), VPPoint4D::SetY(), and VPPoint4D::SetZ(). |
|
Turns transform into identity.
Definition at line 33 of file vptransform.cpp. Referenced by MakeRotation(), MakeScale(), MakeShear(), MakeTranslation(), MakeXRotation(), MakeYRotation(), MakeZRotation(), and VPDof::VPDof(). |
|
Turns transform into a rotation (around some reference axis).
Definition at line 188 of file vptransform.cpp. References MakeRotation(), and MakeTranslation(). |
|
Turns transform into a rotation (around some reference vetor).
Definition at line 143 of file vptransform.cpp. References VPPoint4D::AngleTo(), VPPoint4D::GetX(), VPPoint4D::GetY(), VPPoint4D::GetZ(), MakeIdentity(), MakeXRotation(), MakeYRotation(), MakeZRotation(), VPPoint4D::Normalize(), and VPPoint4D::SetXYZW(). Referenced by VPDof::ComputeLIM(), MakeRotation(), VPCamera::MoveSideways(), VPDof::MoveTo(), VPCamera::PitchAroundTarget(), VPDof::Transform(), VPCamera::Yaw(), and VPCamera::YawAroundTarget(). |
|
Turns transform into a scale.
Definition at line 75 of file vptransform.cpp. References MakeIdentity(). |
|
Turns transform into a shear.
Definition at line 83 of file vptransform.cpp. References MakeIdentity(). |
|
Turns transform into a translation.
Definition at line 62 of file vptransform.h. References MakeTranslation(). |
|
Turns transform into a translation. MakeTranslation expects a vector but actualy ignores the W coordinate.
Definition at line 40 of file vptransform.cpp. References VPPoint4D::GetX(), VPPoint4D::GetY(), VPPoint4D::GetZ(), and MakeIdentity(). Referenced by MakeRotation(), MakeTranslation(), VPCamera::MoveForward(), VPCamera::MoveSideways(), and VPCamera::MoveUp(). |
|
Turns transform into a rotation around the X axis.
Definition at line 48 of file vptransform.cpp. References MakeIdentity(). Referenced by MakeRotation(). |
|
Turns transform into a rotation around the Y axis.
Definition at line 57 of file vptransform.cpp. References MakeIdentity(). Referenced by MakeRotation(). |
|
Turns transform into a rotation around the Z axis.
Definition at line 66 of file vptransform.cpp. References MakeIdentity(). Referenced by MakeRotation(). |
|
Applies transformation to another transform.
Definition at line 104 of file vptransform.cpp. References matrix. |
|
Applies transformation to a point.
Definition at line 90 of file vptransform.cpp. References VPPoint4D::GetW(), VPPoint4D::GetX(), VPPoint4D::GetY(), and VPPoint4D::GetZ(). |
|
Definition at line 114 of file vptransform.cpp. References matrix. |
|
'ostream' class extension to output a transformation on the console.
|