SIM_PositionSimple Class Reference

#include <SIM_PositionSimple.h>

Inheritance diagram for SIM_PositionSimple:

SIM_Position SIM_OptionsUser SIM_Data SIM_Motion RBD_State SIM_PointPosition

List of all members.

Public Member Functions

 GETSET_DATA_FUNCS_V3 (SIM_NAME_POSITION, Position)
 Control the translation attribute of the position.
 GETSET_DATA_FUNCS_V3 (SIM_NAME_PIVOT, Pivot)
 Control the pivot point which the orientation is applied to.
 GETSET_DATA_FUNCS_Q (SIM_NAME_ORIENTATION, Orientation)
 Control the orientation attribute of the position.

Protected Member Functions

 SIM_PositionSimple (const SIM_DataFactory *factory)
virtual ~SIM_PositionSimple ()
virtual void optionChangedSubclass (const char *name)
virtual void getTransformSubclass (UT_DMatrix4 &xform) const
 Gets a transform matrix from our position and rotation data.
virtual void getInverseTransformSubclass (UT_DMatrix4 &xform) const
virtual void getOrientationSubclass (UT_Quaternion &q) const
 Gets a rotation matrix from our position data.
virtual void getPositionSubclass (UT_Vector3 &t) const
 Gets a translation vector from our position data.
virtual void getPivotSubclass (UT_Vector3 &p) const
 Gets pivot info from our position data.
virtual UT_Vector3 selfToWorldSubclass (const UT_Vector3 &p) const
virtual UT_Vector3 worldToSelfSubclass (const UT_Vector3 &p) const
virtual UT_Vector3 selfToWorldVectorSubclass (const UT_Vector3 &p) const
virtual UT_Vector3 worldToSelfVectorSubclass (const UT_Vector3 &p) const
virtual void interpolateSubclass (const SIM_Data *source1, const SIM_Data *source2, fpreal interp)


Detailed Description

This is the simplest implementation for standard positional data. Positional data is not exactly the same as a transform in that it does not permit scales, and the rotation is always applied before the translation.

Definition at line 25 of file SIM_PositionSimple.h.


Constructor & Destructor Documentation

SIM_PositionSimple::SIM_PositionSimple ( const SIM_DataFactory factory  )  [explicit, protected]

virtual SIM_PositionSimple::~SIM_PositionSimple (  )  [protected, virtual]


Member Function Documentation

virtual void SIM_PositionSimple::getInverseTransformSubclass ( UT_DMatrix4 xform  )  const [protected, virtual]

Gets the inverse transform matrix from our position and rotation. Because we build our transform matrices just in time, this is faster than getTransform() & invert().

Reimplemented from SIM_Position.

virtual void SIM_PositionSimple::getOrientationSubclass ( UT_Quaternion q  )  const [protected, virtual]

Gets a rotation matrix from our position data.

Reimplemented from SIM_Position.

virtual void SIM_PositionSimple::getPivotSubclass ( UT_Vector3 p  )  const [protected, virtual]

Gets pivot info from our position data.

Reimplemented from SIM_Position.

virtual void SIM_PositionSimple::getPositionSubclass ( UT_Vector3 t  )  const [protected, virtual]

Gets a translation vector from our position data.

Reimplemented from SIM_Position.

SIM_PositionSimple::GETSET_DATA_FUNCS_Q ( SIM_NAME_ORIENTATION  ,
Orientation   
)

Control the orientation attribute of the position.

SIM_PositionSimple::GETSET_DATA_FUNCS_V3 ( SIM_NAME_PIVOT  ,
Pivot   
)

Control the pivot point which the orientation is applied to.

SIM_PositionSimple::GETSET_DATA_FUNCS_V3 ( SIM_NAME_POSITION  ,
Position   
)

Control the translation attribute of the position.

TODO: These accessors are shadowing the SIM_Position versions. This is a bad thing as getPivot() will not invoke getPivotSubclass and anyone trying to chase the call graph will see an apparent infinite loop. We need to rename these to RawPosition, I think.

virtual void SIM_PositionSimple::getTransformSubclass ( UT_DMatrix4 xform  )  const [protected, virtual]

Gets a transform matrix from our position and rotation data.

Reimplemented from SIM_Position.

virtual void SIM_PositionSimple::interpolateSubclass ( const SIM_Data source1,
const SIM_Data source2,
fpreal  interp 
) [protected, virtual]

Interpolation of positions can't be done in a componentwise fashion. If pivot is changing over time it is important that we adjust the rotation/translation to account for it.

Reimplemented from SIM_Data.

virtual void SIM_PositionSimple::optionChangedSubclass ( const char *  name  )  [protected, virtual]

Override this function so that we can understand an option called rotation. Although this attribute isn't supported directly, it can be reinterpreted into the orientation option.

Reimplemented from SIM_OptionsUser.

Reimplemented in RBD_State.

virtual UT_Vector3 SIM_PositionSimple::selfToWorldSubclass ( const UT_Vector3 p  )  const [protected, virtual]

Transforms a point into worldspace from object space. This is the same as multiplying by getTransform()

Reimplemented from SIM_Position.

virtual UT_Vector3 SIM_PositionSimple::selfToWorldVectorSubclass ( const UT_Vector3 p  )  const [protected, virtual]

Transforms a vector into worldspace from object space. This is the same as multiplying by getTransform()

Reimplemented from SIM_Position.

virtual UT_Vector3 SIM_PositionSimple::worldToSelfSubclass ( const UT_Vector3 p  )  const [protected, virtual]

Transforms a point into object space from world space. This is the same as multiplying by getInverseTransform()

Reimplemented from SIM_Position.

virtual UT_Vector3 SIM_PositionSimple::worldToSelfVectorSubclass ( const UT_Vector3 p  )  const [protected, virtual]

Transforms a vector into object space from world space. This is the same as multiplying by getInverseTransform()

Reimplemented from SIM_Position.


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

Generated on Mon Jan 28 00:29:59 2013 for HDK by  doxygen 1.5.9