All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
WorldConstraint Class Reference

An AxisPlaneConstraint defined in the world coordinate system. More...

## Public Member Functions

virtual | ~WorldConstraint ()
virtual void | constrainTranslation (Vec &translation, Frame *const frame)
virtual void | constrainRotation (Quaternion &rotation, Frame *const frame)
Public Member Functions inherited from AxisPlaneConstraint
| AxisPlaneConstraint ()
virtual | ~AxisPlaneConstraint ()
void | setTranslationConstraint (Type type, const Vec &direction)
void | setTranslationConstraintType (Type type)
void | setTranslationConstraintDirection (const Vec &direction)
Type | translationConstraintType () const
Vec | translationConstraintDirection () const
void | setRotationConstraint (Type type, const Vec &direction)
void | setRotationConstraintType (Type type)
void | setRotationConstraintDirection (const Vec &direction)
Type | rotationConstraintType () const
Vec | rotationConstraintDirection () const
Public Member Functions inherited from Constraint
virtual | ~Constraint ()

## Additional Inherited Members

Public Types inherited from AxisPlaneConstraint
enum | Type { FREE, AXIS, PLANE, FORBIDDEN }

## Detailed Description

An AxisPlaneConstraint defined in the world coordinate system.

The translationConstraintDirection() and rotationConstraintDirection() are expressed in world coordinate system.

See the constrainedFrame and multiView examples for an illustration.

## Constructor & Destructor Documentation

virtual ~WorldConstraint | ( | ) |  |

virtual

Virtual destructor. Empty.

## Member Function Documentation

void constrainRotation | ( | Quaternion & | rotation,
|  | Frame *const | frame
| ) |  |

virtual

When rotationConstraintType() is AxisPlaneConstraint::AXIS, constrain `rotation` to be a rotation around an axis whose direction is defined in the world coordinate system by rotationConstraintDirection().

Reimplemented from AxisPlaneConstraint.

void constrainTranslation | ( | Vec & | translation,
|  | Frame *const | frame
| ) |  |

virtual

Depending on translationConstraintType(), constrain `translation` to be along an axis or limited to a plane defined in the world coordinate system by translationConstraintDirection().

Reimplemented from AxisPlaneConstraint.