LocalConstraint Class Reference

An AxisPlaneConstraint defined in the Frame local coordinate system. More...

Inheritance diagram for LocalConstraint:

List of all members.

Public Member Functions

virtual ~LocalConstraint ()
 Virtual destructor.
virtual void constrainRotation (Quaternion &rotation, Frame *const frame)
 When rotationConstraintType() is AxisPlaneConstraint::AXIS, constrain rotation to be a rotation around an axis whose direction is defined in the Frame local coordinate system by rotationConstraintDirection().
virtual void constrainTranslation (Vec &translation, Frame *const frame)
 Depending on translationConstraintType(), constrain translation to be along an axis or limited to a plane defined in the Frame local coordinate system by translationConstraintDirection().

Detailed Description

An AxisPlaneConstraint defined in the Frame local coordinate system.

The translationConstraintDirection() and rotationConstraintDirection() are expressed in the Frame local coordinate system (see Frame::referenceFrame()).

See the constrainedFrame example for an illustration.

Definition at line 279 of file constraint.h.


Constructor & Destructor Documentation

virtual ~LocalConstraint ( ) [inline, virtual]

Virtual destructor.

Empty.

Definition at line 283 of file constraint.h.


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 Frame local coordinate system by rotationConstraintDirection().

Reimplemented from AxisPlaneConstraint.

Definition at line 144 of file constraint.cpp.

References Vec::projectOnAxis(), AxisPlaneConstraint::rotationConstraintDirection(), and AxisPlaneConstraint::rotationConstraintType().

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 Frame local coordinate system by translationConstraintDirection().

Reimplemented from AxisPlaneConstraint.

Definition at line 120 of file constraint.cpp.

References Vec::projectOnAxis(), Vec::projectOnPlane(), Quaternion::rotate(), Frame::rotation(), AxisPlaneConstraint::translationConstraintDirection(), and AxisPlaneConstraint::translationConstraintType().


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