The ITransformable property interface. More...
#include "murl_graph_i_transformable.h"
Public Member Functions | |
virtual Bool | SetDepthOrder (SInt32 depthOrder)=0 |
Set the depth order. More... | |
virtual SInt32 | GetDepthOrder () const =0 |
Get the depth order. More... | |
virtual Bool | SetTransform (const Matrix &transform)=0 |
Set the 4x4 transformation matrix. More... | |
virtual const Matrix & | GetTransform () const =0 |
Get a constant reference to the internal 4x4 transformation matrix. More... | |
virtual Matrix & | GetTransform ()=0 |
Get a mutable reference to the internal 4x4 transformation matrix. More... | |
virtual Bool | SetPosition (const Vector &pos)=0 |
Set the translation component of the transformation matrix. More... | |
virtual Bool | SetPosition (Real posX, Real posY, Real posZ)=0 |
Set the translation component of the transformation matrix. More... | |
virtual Bool | SetPositionX (Real pos)=0 |
Set the X component of the transformation matrix' translation. More... | |
virtual Bool | SetPositionY (Real pos)=0 |
Set the Y component of the transformation matrix' translation. More... | |
virtual Bool | SetPositionZ (Real pos)=0 |
Set the Z component of the transformation matrix' translation. More... | |
virtual const Vector & | GetPosition () const =0 |
Get a constant reference to the internal position vector. More... | |
virtual Real | GetPositionX () const =0 |
Get the X component of the transformation matrix' translation. More... | |
virtual Real | GetPositionY () const =0 |
Get the Y component of the transformation matrix' translation. More... | |
virtual Real | GetPositionZ () const =0 |
Get the Z component of the transformation matrix' translation. More... | |
virtual Bool | SetRotation (const Vector &axis, Real angle)=0 |
Set the rotation component of the transformation matrix in axis-angle notation. More... | |
virtual Bool | SetRotation (const Quaternion &q)=0 |
Set the rotation component of the transformation matrix by a quaternion. More... | |
virtual Bool | SetRotationOrder (IEnums::RotationOrder rotationOrder)=0 |
Set the axis rotation order for Euler axis notation. More... | |
virtual Bool | SetRotation (Real angleX, Real angleY, Real angleZ)=0 |
Set the rotation component of the transformation matrix in Euler angles notation. More... | |
virtual Bool | SetRotationXYZ (Real angleX, Real angleY, Real angleZ, IEnums::RotationOrder rotationOrder)=0 |
Set the rotation component of the transformation matrix in Euler angles notation with a given rotation order. More... | |
virtual Bool | SetRotationX (Real angle)=0 |
Set the rotation component of the transformation matrix to only rotate around the X axis. More... | |
virtual Bool | SetRotationY (Real angle)=0 |
Set the rotation component of the transformation matrix to only rotate around the Y axis. More... | |
virtual Bool | SetRotationZ (Real angle)=0 |
Set the rotation component of the transformation matrix to only rotate around the Z axis. More... | |
virtual IEnums::RotationOrder | GetRotationOrder () const =0 |
Get the axis rotation order for Euler axis notation. More... | |
virtual const Vector & | GetRotation () const =0 |
Get a constant reference to the internal euler angles vector. More... | |
virtual Real | GetRotationX () const =0 |
Get the rotation around the X axis. More... | |
virtual Real | GetRotationY () const =0 |
Get the rotation around the Y axis. More... | |
virtual Real | GetRotationZ () const =0 |
Get the rotation around the Z axis. More... | |
Detailed Description
The ITransformable property interface.
This interface provides the basis for transforming nodes within a virtual 2D or 3D space. Internally, this encapsulates a 4x4 transformation matrix. In general, transforms are applied according to the hierarchy in which they are specified.
Animation controllers may call the SetTransform() method when translation and/or rotation keys are present in a given Resource::IAnimation.
Member Function Documentation
◆ SetDepthOrder()
Set the depth order.
For any geometry that gets sorted back-to-front (i.e. with disabled Z-Buffer writes), the depth order provides an additional means for sorting, useful when two or more objects share the same depth (or distance value, depending on the depth sorting mode applied by the currently active Graph::ICamera). In such a case, objects with a higher depth order will be drawn later, i.e. on top of others. Like the hierarchical behavior of the transformation matrix, depth orders are also applied relative to their parents.
- Parameters
-
depthOrder A signed 32bit integer
- Returns
- true if successful
Referenced by Murl::Logic::GraphPositionObject::ApplySortDepth().
◆ GetDepthOrder()
|
pure virtual |
Get the depth order.
- Returns
- The transform's depth order
Referenced by Murl::Logic::GraphPositionObject::Init().
◆ SetTransform()
Set the 4x4 transformation matrix.
This method copies the given transformation matrix to the internal matrix as a whole.
- Parameters
-
transform The transformation matrix to apply
- Returns
- true if successful
◆ GetTransform() [1/2]
|
pure virtual |
Get a constant reference to the internal 4x4 transformation matrix.
- Returns
- The transformation matrix
◆ GetTransform() [2/2]
|
pure virtual |
Get a mutable reference to the internal 4x4 transformation matrix.
This method may be called to directly modify the internal transformation matrix. Calling this will internally flag the transform as "modified" in any case, even if it was not actually modified.
- Returns
- The transformation matrix
◆ SetPosition() [1/2]
Set the translation component of the transformation matrix.
This method directly copies the X, Y and Z values of the given position vector to the XW, YW and ZW components of the matrix without modifying any other component.
- Parameters
-
pos The position vector to apply
- Returns
- true if successful
Referenced by Murl::Logic::GraphPositionObject::ApplyPosition().
◆ SetPosition() [2/2]
|
pure virtual |
Set the translation component of the transformation matrix.
This method directly copies the individually given X, Y and Z position values to the XW, YW and ZW components of the matrix without modifying any other component.
- Parameters
-
posX The X component to apply posY The Y component to apply posZ The Z component to apply
- Returns
- true if successful
◆ SetPositionX()
Set the X component of the transformation matrix' translation.
This method directly copies the given X position value to the XW component of the matrix without modifying any other component.
- Parameters
-
pos The X component to apply
- Returns
- true if successful
◆ SetPositionY()
Set the Y component of the transformation matrix' translation.
This method directly copies the given Y position value to the YW component of the matrix without modifying any other component.
- Parameters
-
pos The Y component to apply
- Returns
- true if successful
◆ SetPositionZ()
Set the Z component of the transformation matrix' translation.
This method directly copies the given Z position value to the ZW component of the matrix without modifying any other component.
- Parameters
-
pos The Z component to apply
- Returns
- true if successful
◆ GetPosition()
|
pure virtual |
Get a constant reference to the internal position vector.
- Returns
- The position vector.
Referenced by Murl::Logic::GraphPositionObject::Init().
◆ GetPositionX()
|
pure virtual |
Get the X component of the transformation matrix' translation.
- Returns
- The X component
◆ GetPositionY()
|
pure virtual |
Get the Y component of the transformation matrix' translation.
- Returns
- The Y component
◆ GetPositionZ()
|
pure virtual |
Get the Z component of the transformation matrix' translation.
- Returns
- The Z component
◆ SetRotation() [1/3]
|
pure virtual |
Set the rotation component of the transformation matrix in axis-angle notation.
This method directly overwrites the upper 3x3 matrix of the internal transformation by calculating the rotation component from a given axis and angle. The axis must be normalized (i.e. have unit length), and the angle must be given in radians. Positive angle values result in a clockwise rotation when viewed along the given axis.
- Parameters
-
axis The normalized rotation axis angle The rotation angle around the axis in radians
- Returns
- true if successful
◆ SetRotation() [2/3]
|
pure virtual |
Set the rotation component of the transformation matrix by a quaternion.
This method directly overwrites the upper 3x3 matrix of the internal transformation by calculating the rotation component from a given quaternion.
- Parameters
-
q The quaternion.
- Returns
- true if successful
◆ SetRotationOrder()
|
pure virtual |
Set the axis rotation order for Euler axis notation.
The default axis rotation order is IEnums::ROTATION_ORDER_ZYX.
- Parameters
-
rotationOrder The axis rotation order.
- Returns
- true if successful
◆ SetRotation() [3/3]
|
pure virtual |
Set the rotation component of the transformation matrix in Euler angles notation.
This method directly overwrites the upper 3x3 matrix of the internal transformation by calculating and subsequently applying individual X, Y and Z rotations (Euler angles). Uses the axis rotation order set by SetRotationOrder() or rotationOrder="" XML attribute. Angle values must be given in radians. Positive values result in a clockwise rotation when viewed along the unit X, Y and Z axes, respectively.
- Parameters
-
angleX The rotation angle around the X axis in radians angleY The rotation angle around the Y axis in radians angleZ The rotation angle around the Z axis in radians
- Returns
- true if successful
◆ SetRotationXYZ()
|
pure virtual |
Set the rotation component of the transformation matrix in Euler angles notation with a given rotation order.
This method directly overwrites the upper 3x3 matrix of the internal transformation by calculating and subsequently applying individual X, Y and Z rotations (Euler angles). Angle values must be given in radians. Positive values result in a clockwise rotation when viewed along the unit X, Y and Z axes, respectively.
- Parameters
-
angleX The rotation angle around the X axis in radians angleY The rotation angle around the Y axis in radians angleZ The rotation angle around the Z axis in radians rotationOrder The axis rotation order.
- Returns
- true if successful
◆ SetRotationX()
Set the rotation component of the transformation matrix to only rotate around the X axis.
This method directly overwrites the upper 3x3 matrix of the internal transformation by calculating and applying a rotation around the unit X axis. The angle value must be given in radians. A positive value result in a clockwise rotation.
- Parameters
-
angle The rotation angle around the X axis in radians
- Returns
- true if successful
◆ SetRotationY()
Set the rotation component of the transformation matrix to only rotate around the Y axis.
This method directly overwrites the upper 3x3 matrix of the internal transformation by calculating and applying a rotation around the unit Y axis. The angle value must be given in radians. A positive value result in a clockwise rotation.
- Parameters
-
angle The rotation angle around the Y axis in radians
- Returns
- true if successful
◆ SetRotationZ()
Set the rotation component of the transformation matrix to only rotate around the Z axis.
This method directly overwrites the upper 3x3 matrix of the internal transformation by calculating and applying a rotation around the unit Z axis. The angle value must be given in radians. A positive value result in a clockwise rotation.
- Parameters
-
angle The rotation angle around the Z axis in radians
- Returns
- true if successful
◆ GetRotationOrder()
|
pure virtual |
Get the axis rotation order for Euler axis notation.
- Returns
- The axis rotation order.
◆ GetRotation()
|
pure virtual |
Get a constant reference to the internal euler angles vector.
This method returns the Euler angles set by XML attribute angleX/Y/Z="" or SetRotationX/Y/Z(), SetRotationXYZ() or SetRotation(Real angleX, Real angleY, Real angleZ) only.
- Returns
- The rotation vector.
◆ GetRotationX()
|
pure virtual |
Get the rotation around the X axis.
This method returns the Euler angle set by XML attribute angleX="" or SetRotationX(), SetRotationXYZ() or SetRotation(Real angleX, Real angleY, Real angleZ) only.
If the upper 3x3 matrix of the internal transformation matrix has been modified by other methods, the returned angle is incorrect. In this case Matrix::GetEulerRotation() can be used to calculate corresponding angles.
- Returns
- The rotation around the X axis.
◆ GetRotationY()
|
pure virtual |
Get the rotation around the Y axis.
This method returns the Euler angle set by XML attribute angleY="" or SetRotationY(), SetRotationXYZ() or SetRotation(Real angleX, Real angleY, Real angleZ) only.
If the upper 3x3 matrix of the internal transformation matrix has been modified by other methods, the returned angle is incorrect. In this case Matrix::GetEulerRotation() can be used to calculate corresponding angles.
- Returns
- The rotation around the Y axis.
◆ GetRotationZ()
|
pure virtual |
Get the rotation around the Z axis.
This method returns the Euler angle set by XML attribute angleZ="" or SetRotationZ(), SetRotationXYZ() or SetRotation(Real angleX, Real angleY, Real angleZ) only.
If the upper 3x3 matrix of the internal transformation matrix has been modified by other methods, the returned angle is incorrect. In this case Matrix::GetEulerRotation() can be used to calculate corresponding angles.
- Returns
- The rotation around the Z axis.
The documentation for this interface was generated from the following file:
- murl_graph_i_transformable.h