#include <QGLViewer/constraint.h>
An AxisPlaneConstraint defined in the camera coordinate system. More...
An AxisPlaneConstraint defined in the camera coordinate system.
The translationConstraintDirection() and rotationConstraintDirection() are expressed in the associated camera() coordinate system.
See the constrainedFrame and constrainedCamera examples for an illustration.
Public Member Functions | |
CameraConstraint (const Camera *const camera) | |
Creates a CameraConstraint, whose constrained directions are defined in the camera coordinate system. More... | |
virtual | ~CameraConstraint () |
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 camera() 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 camera() coordinate system by rotationConstraintDirection(). More... | |
const Camera * | camera () const |
Returns the associated Camera. 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... | |
|
explicit |
Creates a CameraConstraint, whose constrained directions are defined in the camera
coordinate system.
|
inlinevirtual |
Virtual destructor.
Empty.
|
inline |
Returns the associated Camera.
Set using the CameraConstraint constructor.
|
virtual |
When rotationConstraintType() is AxisPlaneConstraint::AXIS, constrain rotation
to be a rotation around an axis whose direction is defined in the camera() coordinate system by rotationConstraintDirection().
Reimplemented from qglviewer::AxisPlaneConstraint.
Depending on translationConstraintType(), constrain translation
to be along an axis or limited to a plane defined in the camera() coordinate system by translationConstraintDirection().
Reimplemented from qglviewer::AxisPlaneConstraint.