The ITransformable property interface. More...

#include "murl_graph_i_transformable.h"

Inheritance diagram for Murl::Graph::ITransformable:

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 MatrixGetTransform () const =0
 Get a constant reference to the internal 4x4 transformation matrix. More...
 
virtual MatrixGetTransform ()=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 VectorGetPosition () 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 VectorGetRotation () 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()

virtual Bool Murl::Graph::ITransformable::SetDepthOrder ( SInt32  depthOrder)
pure virtual

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
depthOrderA signed 32bit integer
Returns
true if successful

Referenced by Murl::Logic::GraphPositionObject::ApplySortDepth().

◆ GetDepthOrder()

virtual SInt32 Murl::Graph::ITransformable::GetDepthOrder ( ) const
pure virtual

Get the depth order.

Returns
The transform's depth order

Referenced by Murl::Logic::GraphPositionObject::Init().

◆ SetTransform()

virtual Bool Murl::Graph::ITransformable::SetTransform ( const Matrix transform)
pure virtual

Set the 4x4 transformation matrix.

This method copies the given transformation matrix to the internal matrix as a whole.

Parameters
transformThe transformation matrix to apply
Returns
true if successful

◆ GetTransform() [1/2]

virtual const Matrix& Murl::Graph::ITransformable::GetTransform ( ) const
pure virtual

Get a constant reference to the internal 4x4 transformation matrix.

Returns
The transformation matrix

◆ GetTransform() [2/2]

virtual Matrix& Murl::Graph::ITransformable::GetTransform ( )
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]

virtual Bool Murl::Graph::ITransformable::SetPosition ( const Vector pos)
pure virtual

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
posThe position vector to apply
Returns
true if successful

Referenced by Murl::Logic::GraphPositionObject::ApplyPosition().

◆ SetPosition() [2/2]

virtual Bool Murl::Graph::ITransformable::SetPosition ( Real  posX,
Real  posY,
Real  posZ 
)
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
posXThe X component to apply
posYThe Y component to apply
posZThe Z component to apply
Returns
true if successful

◆ SetPositionX()

virtual Bool Murl::Graph::ITransformable::SetPositionX ( Real  pos)
pure virtual

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
posThe X component to apply
Returns
true if successful

◆ SetPositionY()

virtual Bool Murl::Graph::ITransformable::SetPositionY ( Real  pos)
pure virtual

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
posThe Y component to apply
Returns
true if successful

◆ SetPositionZ()

virtual Bool Murl::Graph::ITransformable::SetPositionZ ( Real  pos)
pure virtual

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
posThe Z component to apply
Returns
true if successful

◆ GetPosition()

virtual const Vector& Murl::Graph::ITransformable::GetPosition ( ) const
pure virtual

Get a constant reference to the internal position vector.

Returns
The position vector.

Referenced by Murl::Logic::GraphPositionObject::Init().

◆ GetPositionX()

virtual Real Murl::Graph::ITransformable::GetPositionX ( ) const
pure virtual

Get the X component of the transformation matrix' translation.

Returns
The X component

◆ GetPositionY()

virtual Real Murl::Graph::ITransformable::GetPositionY ( ) const
pure virtual

Get the Y component of the transformation matrix' translation.

Returns
The Y component

◆ GetPositionZ()

virtual Real Murl::Graph::ITransformable::GetPositionZ ( ) const
pure virtual

Get the Z component of the transformation matrix' translation.

Returns
The Z component

◆ SetRotation() [1/3]

virtual Bool Murl::Graph::ITransformable::SetRotation ( const Vector axis,
Real  angle 
)
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
axisThe normalized rotation axis
angleThe rotation angle around the axis in radians
Returns
true if successful

◆ SetRotation() [2/3]

virtual Bool Murl::Graph::ITransformable::SetRotation ( const Quaternion q)
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
qThe quaternion.
Returns
true if successful

◆ SetRotationOrder()

virtual Bool Murl::Graph::ITransformable::SetRotationOrder ( IEnums::RotationOrder  rotationOrder)
pure virtual

Set the axis rotation order for Euler axis notation.

The default axis rotation order is IEnums::ROTATION_ORDER_ZYX.

Parameters
rotationOrderThe axis rotation order.
Returns
true if successful

◆ SetRotation() [3/3]

virtual Bool Murl::Graph::ITransformable::SetRotation ( Real  angleX,
Real  angleY,
Real  angleZ 
)
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
angleXThe rotation angle around the X axis in radians
angleYThe rotation angle around the Y axis in radians
angleZThe rotation angle around the Z axis in radians
Returns
true if successful

◆ SetRotationXYZ()

virtual Bool Murl::Graph::ITransformable::SetRotationXYZ ( Real  angleX,
Real  angleY,
Real  angleZ,
IEnums::RotationOrder  rotationOrder 
)
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
angleXThe rotation angle around the X axis in radians
angleYThe rotation angle around the Y axis in radians
angleZThe rotation angle around the Z axis in radians
rotationOrderThe axis rotation order.
Returns
true if successful

◆ SetRotationX()

virtual Bool Murl::Graph::ITransformable::SetRotationX ( Real  angle)
pure virtual

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
angleThe rotation angle around the X axis in radians
Returns
true if successful

◆ SetRotationY()

virtual Bool Murl::Graph::ITransformable::SetRotationY ( Real  angle)
pure virtual

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
angleThe rotation angle around the Y axis in radians
Returns
true if successful

◆ SetRotationZ()

virtual Bool Murl::Graph::ITransformable::SetRotationZ ( Real  angle)
pure virtual

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
angleThe rotation angle around the Z axis in radians
Returns
true if successful

◆ GetRotationOrder()

virtual IEnums::RotationOrder Murl::Graph::ITransformable::GetRotationOrder ( ) const
pure virtual

Get the axis rotation order for Euler axis notation.

Returns
The axis rotation order.

◆ GetRotation()

virtual const Vector& Murl::Graph::ITransformable::GetRotation ( ) const
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()

virtual Real Murl::Graph::ITransformable::GetRotationX ( ) const
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()

virtual Real Murl::Graph::ITransformable::GetRotationY ( ) const
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()

virtual Real Murl::Graph::ITransformable::GetRotationZ ( ) const
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


Copyright © 2011-2024 Spraylight GmbH.