constraint.cpp
55 if ((translationConstraintType()!=AxisPlaneConstraint::FREE) && (translationConstraintType()!=AxisPlaneConstraint::FORBIDDEN))
60 qWarning("AxisPlaneConstraint::setTranslationConstraintDir: null vector for translation constraint");
78 if ((rotationConstraintType()!=AxisPlaneConstraint::FREE) && (rotationConstraintType()!=AxisPlaneConstraint::FORBIDDEN))
106 qWarning("AxisPlaneConstraint::setRotationConstraintType: the PLANE type cannot be used for a rotation constraints");
281 Vec axis = frame->transformOf(camera()->frame()->inverseTransformOf(rotationConstraintDirection()));
Definition: camera.h:29
void setRotationConstraint(Type type, const Vec &direction)
Simply calls setRotationConstraintType() and setRotationConstraintDirection().
Definition: constraint.cpp:69
Type translationConstraintType() const
Returns the translation constraint Type().
Definition: constraint.h:228
virtual void constrainRotation(Quaternion &rotation, Frame *const frame)
When rotationConstraintType() is AxisPlaneConstraint::AXIS, constrain rotation to be a rotation aroun...
Definition: constraint.cpp:271
Type rotationConstraintType() const
Returns the rotation constraint Type().
Definition: constraint.h:251
virtual void constrainTranslation(Vec &translation, Frame *const frame)
Depending on translationConstraintType(), constrain translation to be along an axis or limited to a p...
Definition: constraint.cpp:174
An abstract class for Frame Constraints defined by an axis or a plane.
Definition: constraint.h:168
void setTranslationConstraint(Type type, const Vec &direction)
Simply calls setTranslationConstraintType() and setTranslationConstraintDirection().
Definition: constraint.cpp:46
CameraConstraint(const Camera *const camera)
Creates a CameraConstraint, whose constrained directions are defined in the camera coordinate system...
Definition: constraint.cpp:236
ManipulatedCameraFrame * frame() const
Returns the ManipulatedCameraFrame attached to the Camera.
Definition: camera.h:334
virtual void constrainRotation(Quaternion &rotation, Frame *const frame)
When rotationConstraintType() is AxisPlaneConstraint::AXIS, constrain rotation to be a rotation aroun...
Definition: constraint.cpp:145
void setTranslationConstraintDirection(const Vec &direction)
Defines the translationConstraintDirection().
Definition: constraint.cpp:53
void setTranslationConstraintType(Type type)
Sets the Type() of the translationConstraintType().
Definition: constraint.h:216
void projectOnPlane(const Vec &normal)
Projects the Vec on the plane whose normal is normal that passes through the origin.
Definition: vec.cpp:47
Vec rotationConstraintDirection() const
Returns the axis direction used by the rotation constraint.
Definition: constraint.h:259
virtual void constrainTranslation(Vec &translation, Frame *const frame)
Depending on translationConstraintType(), constrain translation to be along an axis or limited to a p...
Definition: constraint.cpp:243
virtual void constrainRotation(Quaternion &rotation, Frame *const frame)
When rotationConstraintType() is AxisPlaneConstraint::AXIS, constrain rotation to be a rotation aroun...
Definition: constraint.cpp:208
The Quaternion class represents 3D rotations and orientations.
Definition: quaternion.h:66
const Frame * referenceFrame() const
Returns the reference Frame, in which coordinates system the Frame is defined.
Definition: frame.h:262
Vec translationConstraintDirection() const
Returns the direction used by the translation constraint.
Definition: constraint.h:238
void setRotationConstraintDirection(const Vec &direction)
Defines the rotationConstraintDirection().
Definition: constraint.cpp:76
The Frame class represents a coordinate system, defined by a position and an orientation.
Definition: frame.h:121
Quaternion rotation() const
Returns the Frame rotation, defined with respect to the referenceFrame().
Definition: frame.h:237
Vec transformOf(const Vec &src) const
Returns the Frame transform of a vector src defined in the world coordinate system (converts vectors ...
Definition: frame.cpp:843
void setRotationConstraintType(Type type)
Set the Type() of the rotationConstraintType().
Definition: constraint.cpp:102
Vec rotate(const Vec &v) const
Returns the image of v by the Quaternion rotation.
Definition: quaternion.cpp:76
virtual void constrainTranslation(Vec &translation, Frame *const frame)
Depending on translationConstraintType(), constrain translation to be along an axis or limited to a p...
Definition: constraint.cpp:121
Vec inverseTransformOf(const Vec &src) const
Returns the world transform of the vector whose coordinates in the Frame coordinate system is src (co...
Definition: frame.cpp:856
void projectOnAxis(const Vec &direction)
Projects the Vec on the axis of direction direction that passes through the origin.
Definition: vec.cpp:34
Type
Type lists the different types of translation and rotation constraints that are available.
Definition: constraint.h:207