SpatiumLib
|
Tranformation in 3D space. More...
#include <Transform.h>
Public Member Functions | |
Transform () | |
geom3d::Vector3 | right () const |
Get the vector pointing to the right (positive X axis) More... | |
geom3d::Vector3 | up () const |
Get the vector pointing up (positive y axis) More... | |
geom3d::Vector3 | back () const |
Get the vector pointing back (positive z axis) More... | |
geom3d::Point3 | position () const |
Get the position in world space (translation) More... | |
void | setPosition (const geom3d::Point3 &xyz) |
Set the position in world space (translation) More... | |
void | translate (const geom3d::Vector3 &xyz) |
Translate in world space. More... | |
geom3d::Vector3 | scale () const |
Get the scale. More... | |
void | rotate (const geom3d::Vector3 &euler) |
Rotate (relative to self/object space) More... | |
void | setRotation (const geom3d::Vector3 &euler) |
Set the rotation in world space. More... | |
geom3d::Vector3 | rotation () const |
Get the rotation in world space. More... | |
void | setMatrix (const geom3d::Matrix4x4 &matrix) |
Set the transformation matrix. More... | |
geom3d::Matrix4x4 | matrix () const |
Get the transformation matrix. More... | |
geom3d::Point3 | objectPointToWorldPoint (const geom3d::Point3 &point) const |
Convert 3D Cartesian point coordinates from object space to world space. Object coordinates are defined with respect to the object's local coordinate system. World coordinates are defined with resect to the world's global cordinate system. (Origin = [0,0,0]) More... | |
geom3d::Point3 | worldPointToObjectPoint (const geom3d::Point3 &point) const |
Convert 3D Cartesian point coordinates from world space to object space. World coordinates are defined with resect to the world's global cordinate system. (Origin = [0,0,0]) Object coordinates are defined with respect to the object's local coordinate system. More... | |
Protected Attributes | |
geom3d::Matrix4x4 | m_matrix |
Transformation matrix. More... | |
Tranformation in 3D space.
Default transformation (identity).
1 0 0 x 0 1 0 y 0 0 1 z 0 0 0 1
1st column = right vector 2nd column = up vector 3rd column = back vector 4rd column = translation (position)
|
inline |
|
inline |
Get the vector pointing back (positive z axis)
|
inline |
Get the transformation matrix.
|
inline |
Convert 3D Cartesian point coordinates from object space to world space. Object coordinates are defined with respect to the object's local coordinate system. World coordinates are defined with resect to the world's global cordinate system. (Origin = [0,0,0])
[in] | point | Point cordinates in object space |
|
inline |
Get the position in world space (translation)
|
inline |
Get the vector pointing to the right (positive X axis)
|
inline |
Rotate (relative to self/object space)
[in] | euler | Degrees around x, y and z axis |
|
inline |
|
inline |
Get the scale.
|
inline |
Set the transformation matrix.
[in] | matrix | Transformation matrix |
|
inline |
Set the position in world space (translation)
[in] | position | Position |
|
inline |
Set the rotation in world space.
[in] | euler | Rotation in euler angles |
|
inline |
Translate in world space.
[in] | xyz | Translation on X, Y and Z axis |
|
inline |
Get the vector pointing up (positive y axis)
|
inline |
Convert 3D Cartesian point coordinates from world space to object space. World coordinates are defined with resect to the world's global cordinate system. (Origin = [0,0,0]) Object coordinates are defined with respect to the object's local coordinate system.
[in] | point | Point cordinates in world space |
|
protected |
Transformation matrix.