Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a 3-dimensional transformation. More...
#include <omTransform3D.h>
Public Member Functions | |
Transform3D () | |
Create an identity transformation that doesn't modify transformed points. More... | |
Transform3D (const VectorND< T, 3 > &newPosition) | |
Create a transformation with the specified translation and no rotation or scaling. More... | |
Transform3D (const VectorND< T, 3 > &newPosition, const MatrixND< T, 3, 3 > &newOrientation) | |
Create a transformation with the specified translation, rotation, and no scaling. More... | |
Transform3D (const VectorND< T, 3 > &newPosition, const MatrixND< T, 3, 3 > &newOrientation, T newScale) | |
Create a transformation with the specified translation, rotation, and uniform scaling. More... | |
Transform3D (const VectorND< T, 3 > &newPosition, const MatrixND< T, 3, 3 > &newOrientation, const VectorND< T, 3 > &newScale) | |
Create a transformation with the specified translation, rotation, and uniform scaling. More... | |
VectorND< T, 3 > | transformToLocal (T original) const |
Transform the specified scalar value to object space. More... | |
VectorND< T, 3 > | transformToLocal (const VectorND< T, 3 > &original) const |
Transform the specified position vector to object space. More... | |
MatrixND< T, 3, 3 > | transformToLocal (const MatrixND< T, 3, 3 > &original) const |
Transform the specified matrix to object space. More... | |
Ray3D< T > | transformToLocal (const Ray3D< T > &ray) const |
Transform the specified ray into object space. More... | |
Plane3D< T > | transformToLocal (const Plane3D< T > &plane) const |
Transform the specified plane into object space. More... | |
AABB3D< T > | transformToLocal (const AABB3D< T > &box) const |
Transform the specified axis-aligned box into object space, producing another axis-aligned box that encloses the original. More... | |
VectorND< T, 3 > | rotateToLocal (const VectorND< T, 3 > &original) const |
Rotate the specified vector to object space. More... | |
VectorND< T, 3 > | scaleToLocal (const VectorND< T, 3 > &original) const |
Scale a vector to object space. More... | |
VectorND< T, 3 > | transformToWorld (T original) const |
Transform the specified scalar value to world space. More... | |
VectorND< T, 3 > | transformToWorld (const VectorND< T, 3 > &original) const |
Transform the specified position vector from object to world space. More... | |
MatrixND< T, 3, 3 > | transformToWorld (const MatrixND< T, 3, 3 > &original) const |
Transform the specified matrix from object to world space. More... | |
Ray3D< T > | transformToWorld (const Ray3D< T > &ray) const |
Transform the specified ray into world space. More... | |
Plane3D< T > | transformToWorld (const Plane3D< T > &plane) const |
Transform the specified plane into world space. More... | |
AABB3D< T > | transformToWorld (const AABB3D< T > &box) const |
Transform the specified axis-aligned box into world space, producing another axis-aligned box that encloses the original. More... | |
VectorND< T, 3 > | rotateToWorld (const VectorND< T, 3 > &original) const |
Rotate the specified vector to world space. More... | |
VectorND< T, 3 > | scaleToWorld (const VectorND< T, 3 > &original) const |
Scale a vector to world space. More... | |
T | operator* (T value) const |
Scale the specified value to world space with this transformation. More... | |
VectorND< T, 3 > | operator* (const VectorND< T, 3 > &vector) const |
Transform the specified vector to world space with this transformation. More... | |
MatrixND< T, 3, 3 > | operator* (const MatrixND< T, 3, 3 > &matrix) const |
Transform the specified matrix to world space with this transformation. More... | |
Ray3D< T > | operator* (const Ray3D< T > &ray) const |
Transform the specified ray to world space with this transformation. More... | |
Plane3D< T > | operator* (const Plane3D< T > &plane) const |
Transform the specified plane to world space with this transformation. More... | |
Transform3D< T > | operator* (const Transform3D< T > &other) const |
Concatenate this transformation with another and return the combined transformation. More... | |
Transform3D< T > | invert () const |
Return the inverse of this transformations that applys the opposite transformation. More... | |
MatrixND< T, 4, 4 > | toMatrix () const |
Convert this transformation into a 4x4 homogeneous-coordinate matrix. More... | |
MatrixND< T, 4, 4 > | toMatrixInverse () const |
Convert the inverse of this transformation into a 4x4 homogeneous-coordinate matrix. More... | |
Public Attributes | |
VectorND< T, 3 > | position |
The translation component of the rigid transformation. More... | |
MatrixND< T, 3, 3 > | orientation |
The rotation component of the rigid transformation. More... | |
VectorND< T, 3 > | scale |
The scaling component of the rigid transformation. More... | |
A class that represents a 3-dimensional transformation.
The transformation is composed of translation, rotation, and scaling. The components are assumed to be in the following order: translation, rotation, and scaling. Thus, when transforming a point from world to object space by the transformation, translation is first applied, followed by scaling, and finally rotation. The reverse holds true for transformations from object to world space.
|
inline |
Create an identity transformation that doesn't modify transformed points.
|
inline |
Create a transformation with the specified translation and no rotation or scaling.
|
inline |
Create a transformation with the specified translation, rotation, and no scaling.
|
inline |
Create a transformation with the specified translation, rotation, and uniform scaling.
|
inline |
Create a transformation with the specified translation, rotation, and uniform scaling.
|
inline |
Transform the specified scalar value to object space.
This will perform any scaling necessary to satisfy the transformation.
|
inline |
Transform the specified position vector to object space.
|
inline |
Transform the specified matrix to object space.
This returns what the specified matrix would be in this transformation's coordinate frame. This method does not perform any scaling on the input matrix. The input matrix is assumed to be an orthonormal rotation matrix.
|
inline |
Transform the specified ray into object space.
This method performs a standard vector transformation for the ray origin and only rotates the ray direction, preserving the length of the ray's direction vector.
|
inline |
Transform the specified plane into object space.
This method rotates the normal of the plane into the new coordinate frame and calculates a new offset for the plane based on the projection of the origin onto the plane in world space transformed to object space.
|
inline |
Transform the specified axis-aligned box into object space, producing another axis-aligned box that encloses the original.
|
inline |
Rotate the specified vector to object space.
This method does not perform any translation or scaling on the input point. This function is ideal for transforming directional quantities like surface normal vectors.
|
inline |
Scale a vector to object space.
|
inline |
Transform the specified scalar value to world space.
This will perform any scaling necessary to satisfy the transformation.
|
inline |
Transform the specified position vector from object to world space.
|
inline |
Transform the specified matrix from object to world space.
This returns what the specified matrix would be in this transformation's coordinate frame. This method does not perform any scaling on the input matrix. The input matrix is assumed to be an orthonormal rotation matrix.
|
inline |
Transform the specified ray into world space.
This method performs a standard vector transformation for the ray origin and only rotates the ray direction, preserving the length of the ray's direction vector.
|
inline |
Transform the specified plane into world space.
This method rotates the normal of the plane into the new coordinate frame and calculates a new offset for the plane based on the projection of the origin onto the plane in object space transformed to world space.
|
inline |
Transform the specified axis-aligned box into world space, producing another axis-aligned box that encloses the original.
|
inline |
Rotate the specified vector to world space.
This method does not perform any translation or scaling on the input point. This function is ideal for transforming directional quantities like surface normal vectors.
|
inline |
Scale a vector to world space.
|
inline |
Scale the specified value to world space with this transformation.
|
inline |
Transform the specified vector to world space with this transformation.
|
inline |
Transform the specified matrix to world space with this transformation.
|
inline |
Transform the specified ray to world space with this transformation.
|
inline |
Transform the specified plane to world space with this transformation.
|
inline |
Concatenate this transformation with another and return the combined transformation.
This transformation represents the total transformation from object space of the other, into this transformation's object space, and then to world space.
|
inline |
Return the inverse of this transformations that applys the opposite transformation.
|
inline |
Convert this transformation into a 4x4 homogeneous-coordinate matrix.
|
inline |
Convert the inverse of this transformation into a 4x4 homogeneous-coordinate matrix.
VectorND<T,3> om::math::Transform3D< T >::position |
The translation component of the rigid transformation.
MatrixND<T,3,3> om::math::Transform3D< T >::orientation |
The rotation component of the rigid transformation.
VectorND<T,3> om::math::Transform3D< T >::scale |
The scaling component of the rigid transformation.