SOFA API  b3f2f2a4
Open source framework for multi-physics simuation
qglviewer::LocalConstraint Class Reference

#include <QGLViewer/constraint.h>

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

Inheritance diagram for qglviewer::LocalConstraint:

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.

Public Member Functions

virtual ~LocalConstraint ()
 Virtual destructor. More...
 
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(). More...
 
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(). More...
 
- Public Member Functions inherited from qglviewer::AxisPlaneConstraint
 AxisPlaneConstraint ()
 Default constructor. More...
 
virtual ~AxisPlaneConstraint ()
 Virtual destructor. More...
 
void setTranslationConstraint (Type type, const Vec &direction)
 Simply calls setTranslationConstraintType() and setTranslationConstraintDirection(). More...
 
void setTranslationConstraintType (Type type)
 Sets the Type() of the translationConstraintType(). More...
 
void setTranslationConstraintDirection (const Vec &direction)
 Defines the translationConstraintDirection(). More...
 
Type translationConstraintType () const
 Returns the translation constraint Type(). More...
 
Vec translationConstraintDirection () const
 Returns the direction used by the translation constraint. More...
 
void setRotationConstraint (Type type, const Vec &direction)
 Simply calls setRotationConstraintType() and setRotationConstraintDirection(). More...
 
void setRotationConstraintType (Type type)
 Set the Type() of the rotationConstraintType(). More...
 
void setRotationConstraintDirection (const Vec &direction)
 Defines the rotationConstraintDirection(). More...
 
Type rotationConstraintType () const
 Returns the rotation constraint Type(). More...
 
Vec rotationConstraintDirection () const
 Returns the axis direction used by the rotation constraint. More...
 
- Public Member Functions inherited from qglviewer::Constraint
virtual ~Constraint ()
 Virtual destructor. More...
 

Constructor details

◆ ~LocalConstraint()

virtual qglviewer::LocalConstraint::~LocalConstraint ( )
inlinevirtual

Virtual destructor.

Empty.

Function details

◆ constrainRotation()

void LocalConstraint::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 qglviewer::AxisPlaneConstraint.

◆ constrainTranslation()

void LocalConstraint::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 qglviewer::AxisPlaneConstraint.