This reference page is linked to from the following overview topics: Mudbox Scenes, Scene Graph, Transformations and Coordinate Space Conversions.
A Transformation is a node in the Mudbox scene that controls the size.
and position of other nodes, such as lights, cameras, or polygon meshes. It represents transformations as a combination of scaling, rotation, and translation, applied in that order. The position of a GroupNode is determined solely by the matrix of its parent Transformation node. In other words, while it is possible to arrange scene objects into a hierarchy, the transformation matrices up the hierarchy are NOT composited together to produce a final transformation.
Definition at line 85 of file transformation.h.
#include <transformation.h>
Public Member Functions |
|
virtual Vector | TransformToWorld (const Vector &vL, float fW=1.0f) |
Transforms a
Vector from local space into world space. |
|
virtual Vector | TransformToLocal (const Vector &vW, float fW=1.0f) |
Transforms a
Vector from world space into local space. |
|
virtual Matrix | LocalToWorldMatrix (void) |
Returns a Matrix
that can transform points or vectors. |
|
virtual Matrix | WorldToLocalMatrix (void) |
Returns a Matrix
that can transform points or vectors. |
|
virtual void | SetLocalToWorldMatrix (const Matrix &mMatrix) |
Sets the Matrix for
this object that will. |
|
virtual Vector | Rotation (void) const |
Returns the rotation component of the
current transformation. |
|
virtual void | SetRotation (const Vector &vYawPitchRoll) |
Sets the rotation component of the current
transformation. |
|
virtual void | SetRotation (const Matrix &mRotation) |
Sets the rotation component of the current
transformation. |
|
virtual void | AddRotation (const Vector &vYawPitchRoll, bool bAfter=false) |
Adds additional rotation to the current
transformation. |
|
virtual void | AddRotation (const Vector &vAxis, float fAngle) |
Adds additional rotation to the current
transformation around a given axis. |
|
virtual Vector | Position (void) const |
Returns the current position (translation)
of the object. |
|
virtual void | SetPosition (const Vector &vVector) |
Sets the position (translation) of the
object. |
|
virtual Vector | Scale (void) const |
Returns the scale factors of the current
transformation. |
|
virtual void | SetScale (const Vector &vScale) |
Sets the scale factors of the current
transformation. |
|
virtual Vector | Pivot (void) const |
Returns the pivot point. |
|
virtual void | SetPivot (const Vector &vNewPivot) |
Sets the pivot point. |
Transforms a Vector from local space into world space.
The Vector class in this SDK is used to represent both points in 3d space, and true vectors (which have directional, but no positional information.) By default, this method assumes that you are transforming a point, and so sets the W value to 1.0. If you are in fact transforming a true vector, you should set fW to 0.
[in] | vL | The point or vector to be transformed |
[in] | fW | The "W" value. Leave as 1.0 for points, set to 0.0 for vectors |
Transforms a Vector from world space into local space.
The Vector class in this SDK is used to represent both points in 3d space, and true vectors (which have directional, but no positional information.) By default, this method assumes that you are transforming a point, and so sets the W value to 1.0. If you are in fact transforming a true vector, you should set fW to 0.
[in] | vW | The point or vector to be transformed |
[in] | fW | The "W" value. Leave as 1.0 for points, set to 0.0 for vectors |
virtual Matrix LocalToWorldMatrix | ( | void | ) | [virtual] |
Returns a Matrix that can transform points or vectors.
from local space into world space.
virtual Matrix WorldToLocalMatrix | ( | void | ) | [virtual] |
Returns a Matrix that can transform points or vectors.
from world space into local space.
virtual void SetLocalToWorldMatrix | ( | const Matrix & | mMatrix | ) | [virtual] |
Sets the Matrix for this object that will.
transform points and vectors from local space to world space.
[in] | mMatrix | A 4x4 transformation matrix |
virtual Vector Rotation | ( | void | ) | const [virtual] |
Returns the rotation component of the current transformation.
as yaw-pitch-roll (x,y,z) values in a Vector. The return values are in degrees.
virtual void SetRotation | ( | const Vector & | vYawPitchRoll | ) | [virtual] |
Sets the rotation component of the current transformation.
The scaling and translation remain unaffected.
[in] | vYawPitchRoll | The new rotation value specified as yaw-pitch-roll (x,y,z), in degrees. |
virtual void SetRotation | ( | const Matrix & | mRotation | ) | [virtual] |
Sets the rotation component of the current transformation.
by specifying a rotation matrix. The scaling and translation remain unaffected.
[in] | mRotation | A 4x4 rotation matrix |
virtual void AddRotation | ( | const Vector & | vYawPitchRoll, |
bool | bAfter =
false |
||
) | [virtual] |
Adds additional rotation to the current transformation.
The scaling and translation remain unaffected.
[in] | vYawPitchRoll | The rotation value to be added, specified as yaw-pitch-roll (x,y,z), in degrees. |
[in] | bAfter | If true, the new rotation will be applied AFTER the existing one. If false, the new rotation will be applied before the existing one. |
virtual void AddRotation | ( | const Vector & | vAxis, |
float | fAngle | ||
) | [virtual] |
Adds additional rotation to the current transformation around a given axis.
The scaling and translation remain unaffected.
[in] | vAxis | The axis to rotate around |
[in] | fAngle | The rotation angle value |
virtual Vector Position | ( | void | ) | const [virtual] |
Returns the current position (translation) of the object.
(That is, the position of the origin after being transformed from local space to world space.)
virtual void SetPosition | ( | const Vector & | vVector | ) | [virtual] |
Sets the position (translation) of the object.
[in] | vVector | The new translation value |
virtual Vector Scale | ( | void | ) | const [virtual] |
Returns the scale factors of the current transformation.
virtual void SetScale | ( | const Vector & | vScale | ) | [virtual] |
Sets the scale factors of the current transformation.
[in] | vScale | The new scale factors in x, y, and z. |
virtual Vector Pivot | ( | void | ) | const [virtual] |
Returns the pivot point.
virtual void SetPivot | ( | const Vector & | vNewPivot | ) | [virtual] |