Public Types | Public Member Functions
CRotationf Class Reference

Detailed Description

Provides conversion facilities for various rotation representations including Euler angles, Quaternion, Axis angle and rotation matrix. CRotationf is typically used for implementing custom ICE nodes.

Note:
All angle values are expressed in radians.
See also:
CQuaternionf

#include <xsi_rotationf.h>

List of all members.

Public Types

enum  RotationOrder {
  siXYZ = 0,
  siXZY = 1,
  siYXZ = 2,
  siYZX = 3,
  siZXY = 4,
  siZYX = 5
}
enum  RotationRep {
  siQuaternionRot = 0,
  siEulerRot,
  siAxisAngleRot
}

Public Member Functions

SICPPSDK_INLINE CRotationf ()
SICPPSDK_INLINE CRotationf (const CRotationf &in_rotation)
SICPPSDK_INLINE CRotationf (const CVector3f &in_EulerAngles, const RotationOrder in_RotOrder=siXYZ)
SICPPSDK_INLINE CRotationf (const float in_X, const float in_Y, const float in_Z, const RotationOrder in_RotOrder=siXYZ)
SICPPSDK_INLINE CRotationf (const CQuaternionf &in_Quat)
SICPPSDK_INLINE CRotationf (const CVector3f &in_Axis, const float in_Angle)
SICPPSDK_INLINE ~CRotationf ()
SICPPSDK_INLINE CRotationfoperator= (const CRotationf &in_rotation)
SICPPSDK_INLINE CVector3f GetXYZAngles (const RotationOrder in_Order) const
SICPPSDK_INLINE void GetXYZAngles (float &io_X, float &io_Y, float &io_Z) const
SICPPSDK_INLINE CVector3f GetXYZAngles () const
SICPPSDK_INLINE RotationOrder GetOrder () const
SICPPSDK_INLINE void SetOrder (const RotationOrder in_rotOrder)
SICPPSDK_INLINE RotationRep GetRepresentation () const
SICPPSDK_INLINE void SetRepresentation (const RotationRep in_rotRep, const RotationOrder in_order=siXYZ)
SICPPSDK_INLINE CRotationfSet (const RotationOrder in_order, const bool in_bCompensate=false)
SICPPSDK_INLINE CRotationfSet (const CVector3f &in_EulerAngles, const RotationOrder in_Order=siXYZ)
SICPPSDK_INLINE CRotationfSet (const float in_X, const float in_Y, const float in_Z, const RotationOrder in_Order=siXYZ)
SICPPSDK_INLINE CRotationfSet (const CQuaternionf &in_Quat)
SICPPSDK_INLINE CRotationfMul (const CRotationf &in_rot)
SICPPSDK_INLINE CRotationfMul (const CRotationf &in_rot1, const CRotationf &in_rot2)
SICPPSDK_INLINE CRotationfMul (const float in_scalar)
SICPPSDK_INLINE CRotationfLeftMul (const CRotationf &in_rot)
SICPPSDK_INLINE CRotationfInterpolate (const CRotationf &in_rot1, const CRotationf &in_rot2, const float in_u)
SICPPSDK_INLINE CRotationfDiv (const CRotationf &in_rot1, const float in_scalar)
SICPPSDK_INLINE CRotationfDiv (const float in_scalar)
SICPPSDK_INLINE CRotationfDiv (const CRotationf &in_rot)
SICPPSDK_INLINE CRotationfDiv (const CRotationf &in_rot1, const CRotationf &in_rot2)
SICPPSDK_INLINE CRotationfInvert ()
SICPPSDK_INLINE CRotationfInvert (const CRotationf &in_rot)
SICPPSDK_INLINE CQuaternionf GetQuaternion () const
SICPPSDK_INLINE CRotationfoperator= (const CQuaternionf &in_Quat)
SICPPSDK_INLINE CVector3f GetAxisAngle (float &io_Angle) const
SICPPSDK_INLINE CRotationfSet (const CVector3f &in_Axis, const float in_Angle)
SICPPSDK_INLINE void SetIdentity ()
SICPPSDK_INLINE bool Equals (const CRotationf &in_rot) const
SICPPSDK_INLINE bool EpsilonEquals (const CRotationf &in_rot, const float in_fEpsilon) const
SICPPSDK_INLINE bool operator== (const CRotationf &in_rot) const
SICPPSDK_INLINE bool operator!= (const CRotationf &in_rot) const
SICPPSDK_INLINE bool operator< (const CRotationf &in_rot) const

Member Enumeration Documentation

Defines the rotation order of a rotation for the Euler angles representation.

Enumerator:
siXYZ 

X, Y, Z order

siXZY 

X, Z, Y order

siYXZ 

Y, X, Z order

siYZX 

Y, Z, X order

siZXY 

Z, X, Y order

siZYX 

Z, Y, X order

Defines the rotation representation.

Enumerator:
siQuaternionRot 

Quaternion representation

siEulerRot 

Euler representation

siAxisAngleRot 

Axis angle representation


Constructor & Destructor Documentation

SICPPSDK_INLINE CRotationf ( )

Default constructor.

SICPPSDK_INLINE CRotationf ( const CRotationf in_rotation)

Copy constructor.

Parameters:
in_rotationRotation to copy
SICPPSDK_INLINE CRotationf ( const CVector3f in_EulerAngles,
const RotationOrder  in_RotOrder = siXYZ 
)

Constructor (from CVector3f of Euler angles).

Parameters:
in_EulerAnglesEuler angles to construct from
in_RotOrderRotation order to use
See also:
CRotationf::Set, CRotationf::SetOrder
SICPPSDK_INLINE CRotationf ( const float  in_X,
const float  in_Y,
const float  in_Z,
const RotationOrder  in_RotOrder = siXYZ 
)

Constructor (from XYZ Euler angles).

Parameters:
in_XX angle
in_YY angle
in_ZZ angle
in_RotOrderRotation order to use
See also:
CRotationf::Set, CRotationf::SetOrder
SICPPSDK_INLINE CRotationf ( const CQuaternionf in_Quat)

Constructor (from a quaternion).

Parameters:
in_QuatQuaternion to construct from
See also:
CRotationf::GetQuaternion, CRotationf::Set
SICPPSDK_INLINE CRotationf ( const CVector3f in_Axis,
const float  in_Angle 
)

Constructor (using axis angle representation).

Parameters:
in_AxisAxis of rotation
in_AngleRotation angle around the axis
See also:
CRotationf::GetAxisAngle, CRotationf::Set
SICPPSDK_INLINE ~CRotationf ( )

Default destructor.


Member Function Documentation

SICPPSDK_INLINE CRotationf & operator= ( const CRotationf in_rotation)

Assignment operator.

Parameters:
in_rotationRotation to copy
Returns:
A reference to this rotation.
SICPPSDK_INLINE CVector3f GetXYZAngles ( const RotationOrder  in_Order) const

Returns the euler angles of the rotation as a CVector3f from a rotation order.

Parameters:
in_OrderRotation order
Returns:
CVector3f Rotation euler angle vector
See also:
CRotationf::Set, CRotationf::GetOrder
SICPPSDK_INLINE void GetXYZAngles ( float &  io_X,
float &  io_Y,
float &  io_Z 
) const

Returns the Euler angles's representation of the rotation.

Parameters:
io_XX angle
io_YY angle
io_ZZ angle
See also:
CRotationf::Set, CRotationf::GetOrder
SICPPSDK_INLINE CVector3f GetXYZAngles ( ) const

Returns the Euler angles's representation of the rotation.

Returns:
Euler vector
See also:
CRotationf::Set, CRotationf::GetOrder
SICPPSDK_INLINE CRotationf::RotationOrder GetOrder ( ) const

Returns the rotation order of this rotation for the Euler angles representation.

Returns:
CRotationf::RotationOrder
SICPPSDK_INLINE void SetOrder ( const RotationOrder  in_rotOrder)

Sets the rotation order for the Euler angles representation.

Parameters:
in_rotOrderNew rotation order to use
See also:
CRotationf::GetOrder
SICPPSDK_INLINE CRotationf::RotationRep GetRepresentation ( ) const

Returns the rotation representation of this rotation.

Returns:
CRotationf::RotationRep
void SetRepresentation ( const RotationRep  in_rotRep,
const RotationOrder  in_order = siXYZ 
)

Sets the rotation representation for this rotation.

Parameters:
in_rotRepRotation representation to set
in_orderNew rotation order to use
See also:
CRotationf::GetOrder
SICPPSDK_INLINE CRotationf & Set ( const RotationOrder  in_order,
const bool  in_bCompensate = false 
)

Change the current rotation from a rotation order with the option of preserving the overall rotation matrix. If in_bCompensate is true then XYZ rotation angles will be recomputed based on the new rotation order to maintain the overall rotation (so the object's orientation will not change). If false (default), then the XYZ rotation angles are preserved but combined in a different order so the overall rotation will change (the object's orientation will change).

Parameters:
in_orderRotation order type.
in_bCompensateCompensation flag.
Returns:
This rotation
See also:
CRotationf::SetOrder
SICPPSDK_INLINE CRotationf & Set ( const CVector3f in_EulerAngles,
const RotationOrder  in_Order = siXYZ 
)

Sets the current rotation from Euler angles.

Parameters:
in_EulerAnglesVector containing the rotation angles
in_OrderRotation order
Returns:
This rotation
See also:
CRotationf::GetXYZAngles, CRotationf::SetOrder
SICPPSDK_INLINE CRotationf & Set ( const float  in_X,
const float  in_Y,
const float  in_Z,
const RotationOrder  in_Order = siXYZ 
)

Sets the rotation from Euler angles.

Parameters:
in_XX angle
in_YY angle
in_ZZ angle
in_OrderRequested rotation order
Returns:
This rotation
See also:
CRotationf::GetXYZAngles, CRotationf::SetOrder
SICPPSDK_INLINE CRotationf & Set ( const CQuaternionf in_Quat)

Sets the rotation from a quaternion.

Parameters:
in_QuatQuaternion to set from
Returns:
This rotation
See also:
CRotationf::GetQuaternion
SICPPSDK_INLINE CRotationf & Mul ( const CRotationf in_rot)

Multiplies this rotation with another one in place.

Parameters:
in_rotRotation to multiply
Returns:
This rotation
SICPPSDK_INLINE CRotationf & Mul ( const CRotationf in_rot1,
const CRotationf in_rot2 
)

Stores the result of the multiplication of two rotations.

Parameters:
in_rot1First rotation
in_rot2Second rotation
Returns:
This rotation
SICPPSDK_INLINE CRotationf & Mul ( const float  in_scalar)

Multiply in-place this rotation with a scalar.

Parameters:
in_scalarscalar multiplier.
Returns:
This rotation
SICPPSDK_INLINE CRotationf & LeftMul ( const CRotationf in_rot)

Left multiply in-place this rotation with a rotation.

Parameters:
in_rotRotation operand
Returns:
This rotation
SICPPSDK_INLINE CRotationf & Interpolate ( const CRotationf in_rot1,
const CRotationf in_rot2,
const float  in_u 
)

Interpolate two rotations into this one for in_u between 0 and 1.

Parameters:
in_rot1Starting rotation.
in_rot2Ending rotation.
in_uInterpolation factor between 0 (starting rotation) and 1 (ending rotation).
Returns:
This rotation.
SICPPSDK_INLINE CRotationf& Div ( const CRotationf in_rot1,
const float  in_scalar 
)

Divides in-place this rotation with the specified rotation and scalar.

Parameters:
in_rot1Rotation divisor
in_scalarScalar multiplier.
Returns:
This rotation
SICPPSDK_INLINE CRotationf & Div ( const float  in_scalar)

Divides in-place this rotation with a scalar.

Parameters:
in_scalarscalar multiplier.
Returns:
This rotation
SICPPSDK_INLINE CRotationf & Div ( const CRotationf in_rot)

Divides in-place by a rotation. Same as Mul by Invert.

Parameters:
in_rotRotation operand.
Returns:
This rotation
SICPPSDK_INLINE CRotationf & Div ( const CRotationf in_rot1,
const CRotationf in_rot2 
)

Divide in-place in_rot1 by in_rot2. Same as Mul by Invert.

Parameters:
in_rot1First rotation operand.
in_rot2Second rotation operand.
Returns:
This rotation
SICPPSDK_INLINE CRotationf & Invert ( )

Inverts the rotation in place.

Returns:
This rotation
SICPPSDK_INLINE CRotationf & Invert ( const CRotationf in_rot)

Stores the invert of a rotation.

Parameters:
in_rotRotation to invert
Returns:
This rotation
SICPPSDK_INLINE CQuaternionf GetQuaternion ( void  ) const

Returns the quaternion representation of the rotation.

Returns:
CQuaternionf
See also:
CRotationf::Set
SICPPSDK_INLINE CRotationf & operator= ( const CQuaternionf in_Quat)

Sets the rotation from a quaternion.

Parameters:
in_QuatQuaternion to set from
Returns:
This rotation
See also:
CRotationf::Set
SICPPSDK_INLINE CVector3f GetAxisAngle ( float &  io_Angle) const

Returns the axis angle representation of the rotation.

Parameters:
io_AngleRotation angle around the axis
Returns:
CVector3f Axis of rotation
See also:
CRotationf::Set
SICPPSDK_INLINE CRotationf & Set ( const CVector3f in_Axis,
const float  in_Angle 
)

Sets the rotation from an axis angle.

Parameters:
in_AxisAxis of rotation
in_AngleRotation angle around the axis
Returns:
This rotation
See also:
CRotationf::GetAxisAngle
SICPPSDK_INLINE void SetIdentity ( )

Sets the rotation to identity rotation.

SICPPSDK_INLINE bool Equals ( const CRotationf in_rot) const

Performs exact comparison of two quaternions.

Note:
Each parameter of both quaternions must be exactly the same for a match.
Parameters:
in_rotRotation to compare against
See also:
CRotationf::EpsilonEquals
SICPPSDK_INLINE bool EpsilonEquals ( const CRotationf in_rot,
const float  in_fEpsilon 
) const

Performs comparison between this rotation and in_rot within the specified epsilon value.

Parameters:
in_rotRotation to compare against.
in_fEpsilonTolerance value
See also:
CRotationf::EpsilonEquals
SICPPSDK_INLINE bool operator== ( const CRotationf in_rot) const

Performs exact comparison of two quaternions.

Note:
Each parameter of both quaternions must be exactly the same for a match.
Parameters:
in_rotRotation to compare against
See also:
CRotationf::EpsilonEquals, CRotationf::Equals
SICPPSDK_INLINE bool operator!= ( const CRotationf in_rot) const

Inequality operator tests the strict inequality of this rotation with the rotation in_rotation.

Parameters:
in_rotOperand rotation.
Returns:
true if equal else false.
See also:
CRotationf::Equals
SICPPSDK_INLINE bool operator< ( const CRotationf in_rot) const

Less than operator. Performs a comparison with a specified CRotationf to determine if this CRotationf is less than the specified CRotationf. The comparison is arbitrary and not geometrically meaningful, it's only purpose is to make CRotationf compliant with stl for sorting operations.

Parameters:
in_rotCRotationf to compare.
Returns:
true if this CRotationf is less than the specified CRotationf, false otherwise.
Since:
7.5

The documentation for this class was generated from the following file: