39 : translationConstraintType_(
FREE), rotationConstraintType_(
FREE)
56 const float norm = direction.
norm();
59 qWarning(
"AxisPlaneConstraint::setTranslationConstraintDir: null vector for translation constraint");
79 float norm = direction.
norm();
82 qWarning(
"AxisPlaneConstraint::setRotationConstraintDir: null vector for rotation constraint");
105 qWarning(
"AxisPlaneConstraint::setRotationConstraintType: the PLANE type cannot be used for a rotation constraints");
136 translation =
Vec(0.0, 0.0, 0.0);
155 Vec quat =
Vec(rotation[0], rotation[1], rotation[2]);
157 rotation =
Quaternion(quat, 2.0*acos(rotation[3]));
199 translation =
Vec(0.0, 0.0, 0.0);
217 Vec quat(rotation[0], rotation[1], rotation[2]);
220 rotation =
Quaternion(quat, 2.0*acos(rotation[3]));
262 translation =
Vec(0.0, 0.0, 0.0);
281 Vec quat =
Vec(rotation[0], rotation[1], rotation[2]);
283 rotation =
Quaternion(quat, 2.0*acos(rotation[3]));
void setRotationConstraintDirection(const Vec &direction)
Vec rotationConstraintDir_
Vec translationConstraintDirection() const
Vec inverseTransformOf(const Vec &src) const
void setTranslationConstraint(Type type, const Vec &direction)
const Camera * camera() const
void setRotationConstraint(Type type, const Vec &direction)
Vec translationConstraintDir_
An abstract class for Frame Constraints defined by an axis or a plane.
Vec transformOf(const Vec &src) const
Vec rotate(const Vec &v) const
void projectOnPlane(const Vec &normal)
Type translationConstraintType() const
Vec rotationConstraintDirection() const
Type rotationConstraintType() const
virtual void constrainTranslation(Vec &translation, Frame *const frame)
CameraConstraint(const Camera *const camera)
virtual void constrainTranslation(Vec &translation, Frame *const frame)
ManipulatedCameraFrame * frame() const
void setTranslationConstraintDirection(const Vec &direction)
The Vec class represents 3D positions and 3D vectors.
Quaternion rotation() const
virtual void constrainRotation(Quaternion &rotation, Frame *const frame)
Type translationConstraintType_
A perspective or orthographic camera.
The Quaternion class represents 3D rotations and orientations.
void projectOnAxis(const Vec &direction)
Type rotationConstraintType_
void setTranslationConstraintType(Type type)
The Frame class represents a coordinate system, defined by a position and an orientation.
void setRotationConstraintType(Type type)
const Frame * referenceFrame() const
virtual void constrainTranslation(Vec &translation, Frame *const frame)
virtual void constrainRotation(Quaternion &rotation, Frame *const frame)
virtual void constrainRotation(Quaternion &rotation, Frame *const frame)