#include <erf/erf_constraint.hpp>>
Public Member Functions | |
virtual | ~Constraint () |
virtual void | constrainTranslation (Vec3 &translation, Frame *const frame) |
virtual void | constrainRotation (Quaternion &rotation, Frame *const frame) |
Definition at line 84 of file erf_constraint.hpp.
virtual Constraint::~Constraint | ( | ) | [inline, virtual] |
Virtual destructor. Empty.
Definition at line 88 of file erf_constraint.hpp.
virtual void Constraint::constrainTranslation | ( | Vec3 & | translation, | |
Frame *const | frame | |||
) | [inline, virtual] |
Filters the translation applied to the frame
. This default implementation is empty (no filtering).
Overload this method in your own Constraint class to define a new translation constraint. frame
is the Frame to which is applied the translation. It is not defined const
, but you should refrain from directly changing its value in the constraint. Use its Frame::position() and update the translation
accordingly instead.
translation
is expressed in local frame coordinate system. Use Frame::inverseTransformOf() to express it in the world coordinate system if needed.
Reimplemented in AxisPlaneConstraint, LocalConstraint, and WorldConstraint.
Definition at line 97 of file erf_constraint.hpp.
virtual void Constraint::constrainRotation | ( | Quaternion & | rotation, | |
Frame *const | frame | |||
) | [inline, virtual] |
Filters the rotation applied to the frame
. This default implementation is empty (no filtering).
Overload this method in your own Constraint class to define a new rotation constraint. See constrainTranslation() for details.
Use Frame::inverseTransformOf() on the rotation
Quaternion::axis() to express rotation
in the world coordinate system if needed.
Reimplemented in AxisPlaneConstraint, LocalConstraint, and WorldConstraint.
Definition at line 103 of file erf_constraint.hpp.