Class hierarchy Compound list File list Compound Members File Members
Matrix3D Struct Reference
A 4x4 Matrix used for affine transformations. More...
Public Members
- void setPosition (const Vector3D& v)
- sets _41, _42 and _43 to v.x, v.y, v.z respectively.
- Vector3D getPosition () const
- returns _41, _42, and _43 as a Vector3D.
- void setDirection (const Vector3D& dir, const Vector3D& up)
- sets the orientation portion of the matrix such that forward() will move toward dir and that the up vector points toward up.
- Vector3D getDirection (const float Size=1.0f) const
- fetch the forward direction of the orientation as a vector scaled by Size.
- Vector3D getDirectionUp (const float Size=1.0f) const
- fetch the up direction of the orientation scaled by Size.
- Vector3D getDirectionRight (const float Size=1.0f) const
- fetch the "right" direction of the orientation as a vector scaled by Size.
- void forward (const float d)
- relocate the position d units along the forward vector.
- void relocate (const Vector3D& v)
- translate the position by v.
- void rotate (const Vector3D& v)
- rotate the matrix by the euler angles given in v.
- void scale (const float s)
- scale the matrix by s.
- void align (const Matrix3D& m)
- align this matrix with the matrix given by m.
Detailed Description
A 4x4 Matrix used for affine transformations.
Member Function Documentation
void Matrix3D::setPosition(const Vector3D& v)
sets _41, _42 and _43 to v.x, v.y, v.z respectively.
Vector3D Matrix3D::getPosition() const
returns _41, _42, and _43 as a Vector3D.
void Matrix3D::setDirection(const Vector3D& dir, const Vector3D& up)
sets the orientation portion of the matrix such that forward() will move toward dir and that the up vector points toward up.
Neither dir nor up must be normalized.
Vector3D Matrix3D::getDirection(const float Size=1.0f) const
fetch the forward direction of the orientation as a vector scaled by Size.
Vector3D Matrix3D::getDirectionUp(const float Size=1.0f) const
fetch the up direction of the orientation scaled by Size.
Vector3D Matrix3D::getDirectionRight(const float Size=1.0f) const
fetch the "right" direction of the orientation as a vector scaled by Size.
void Matrix3D::forward(const float d)
relocate the position d units along the forward vector.
void Matrix3D::relocate(const Vector3D& v)
translate the position by v.
void Matrix3D::rotate(const Vector3D& v)
rotate the matrix by the euler angles given in v.
void Matrix3D::scale(const float s)
void Matrix3D::align(const Matrix3D& m)
align this matrix with the matrix given by m.
(simply assigns m to this).
The documentation for this struct was generated from the following file: