23 #ifndef QGLVIEWER_CONSTRAINT_H
24 #define QGLVIEWER_CONSTRAINT_H
27 #include "quaternion.h"
207 enum Type { FREE, AXIS, PLANE, FORBIDDEN };
214 void setTranslationConstraint(Type type,
const Vec& direction);
217 void setTranslationConstraintDirection(
const Vec& direction);
246 void setRotationConstraint(Type type,
const Vec& direction);
247 void setRotationConstraintType(Type type);
248 void setRotationConstraintDirection(
const Vec& direction);
264 Type translationConstraintType_;
265 Type rotationConstraintType_;
267 Vec translationConstraintDir_;
268 Vec rotationConstraintDir_;
285 virtual void constrainTranslation(
Vec& translation,
Frame*
const frame);
286 virtual void constrainRotation (
Quaternion& rotation,
Frame*
const frame);
305 virtual void constrainTranslation(
Vec& translation,
Frame*
const frame);
306 virtual void constrainRotation (
Quaternion& rotation,
Frame*
const frame);
326 virtual void constrainTranslation(
Vec& translation,
Frame*
const frame);
327 virtual void constrainRotation (
Quaternion& rotation,
Frame*
const frame);
333 const Camera*
const camera_;
338 #endif // QGLVIEWER_CONSTRAINT_H