Osiris Framework  0.3
OState Class Reference

Controls object orientation and motion state. More...

#include <OsirisSDK/OState.h>

Public Types

enum  OrientationReferencial { Scene =0x01, Object }
 Specifies the rotation referencial to be taken into account while working with the motion equation components. More...
 

Public Member Functions

 OState (OrientationReferencial ref=Scene)
 Class constructor.
 
virtual ~OState ()
 Class destructor.
 
void setOrientationReferencial (OrientationReferencial orRef)
 Sets the orientation referencial used on the motion equation components.
 
OrientationReferencial orientationReferencial () const
 Provides the orientation referencial used on the motion equation components.
 
void setMotionComponent (int degree, const OVector3 &component, OrientationReferencial orRef)
 Defines motion equation vector components. More...
 
void addMotionComponent (int degree, const OVector3 &component, OrientationReferencial orRef)
 Adds to a motion equation vector component. More...
 
OVector3 motionComponent (int degree, OrientationReferencial orRef) const
 Obtain motion state components for a given degree in the specified orientation reference frame. More...
 
OVector3motionComponent (int degree)
 Obtain motion state component for a given degree in the current orientation reference frame. More...
 
OVector3position ()
 Returns a pointer to the vector containing position coordinates.
 
void setOrientation (const OVector3 &or)
 Set orientation in terms of Euler angles. More...
 
OQuaternionorientation ()
 Retrieves the reference to the quaternion used for orientation transform.
 
OStateConstraintminConstraint (int degree)
 Return the minimum value constraint for a given motion state degree. More...
 
OStateConstraintmaxConstraint (int degree)
 Return the maximum value constraint for a given motion state degree. More...
 
void disableAllConstraints ()
 Disable all constraints on the motion state.
 
void update (const OTimeIndex &timeIndex)
 Update state for a given time index. More...
 

Detailed Description

Controls object orientation and motion state.

Member Enumeration Documentation

Specifies the rotation referencial to be taken into account while working with the motion equation components.

Enumerator
Scene 

Scene referencial

Object 

Object referencial

Member Function Documentation

void OState::addMotionComponent ( int  degree,
const OVector3 component,
OrientationReferencial  orRef 
)

Adds to a motion equation vector component.

Parameters
degreeThe degree of the component (i.e. 1 = velocity, 2 = acceleration, etc.): the n-th derivative of the motion state equation.
componentComponent value. Time is given in microseconds.
orRefThe orientation referencial that this new values is defined in.
OStateConstraint * OState::maxConstraint ( int  degree)

Return the maximum value constraint for a given motion state degree.

´

Parameters
degreeThe degree of the component (i.e. 0 = position, 1 = velocity, 2 = acceleration, etc.).
Returns
Pointer to the constraint object, NULL if degree is non-existant.
OStateConstraint * OState::minConstraint ( int  degree)

Return the minimum value constraint for a given motion state degree.

Parameters
degreeThe degree of the component (i.e. 0 = position, 1 = velocity, 2 = acceleration, etc.).
Returns
Pointer to the constraint object, NULL if degree is non-existant.
OVector3 OState::motionComponent ( int  degree,
OrientationReferencial  orRef 
) const

Obtain motion state components for a given degree in the specified orientation reference frame.

Parameters
degreeThe degree of the component (i.e. 1 = velocity, 2 = acceleration, etc.): the n-th derivative of the motion state equation.
orRefThe orientation referencial that this new values is defined in.
Returns
Vector component for a given degree. Time is given in microseconds.
OVector3 & OState::motionComponent ( int  degree)

Obtain motion state component for a given degree in the current orientation reference frame.

Parameters
degreeThe degree of the component (i.e. 1 = velocity, 2 = acceleration, etc.): the n-th derivative of the motion state equation.
Returns
Pointer to the vector component for a given degree. Time is given in microseconds.
void OState::setMotionComponent ( int  degree,
const OVector3 component,
OrientationReferencial  orRef 
)

Defines motion equation vector components.

Parameters
degreeThe degree of the component (i.e. 1 = velocity, 2 = acceleration, etc.): the n-th derivative of the motion state equation.
componentComponent value. Time is given in microseconds.
orRefThe orientation referencial that this new values is defined in.
void OState::setOrientation ( const OVector3 or)

Set orientation in terms of Euler angles.

Parameters
orVector containing Euler angles representing rotation for each axis.
void OState::update ( const OTimeIndex timeIndex)

Update state for a given time index.

Parameters
timeIndexTime index.

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