CameraConstraint Class Reference
An AxisPlaneConstraint defined in the camera coordinate system. More...

Public Member Functions | |
CameraConstraint (const Camera *const camera) | |
Creates a CameraConstraint, whose constrained directions are defined in the camera coordinate system. | |
virtual | ~CameraConstraint () |
Virtual destructor. | |
const Camera * | camera () const |
Returns the associated Camera. | |
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(). | |
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(). |
Detailed Description
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.
Definition at line 319 of file constraint.h.
Constructor & Destructor Documentation
CameraConstraint | ( | const Camera *const | camera | ) | [explicit] |
Creates a CameraConstraint, whose constrained directions are defined in the camera
coordinate system.
Definition at line 235 of file constraint.cpp.
virtual ~CameraConstraint | ( | ) | [inline, virtual] |
Member Function Documentation
const Camera* camera | ( | ) | const [inline] |
Returns the associated Camera.
Set using the CameraConstraint constructor.
Definition at line 330 of file constraint.h.
Referenced by CameraConstraint::constrainRotation(), and CameraConstraint::constrainTranslation().
void 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 camera() coordinate system by rotationConstraintDirection().
Reimplemented from AxisPlaneConstraint.
Definition at line 270 of file constraint.cpp.
References CameraConstraint::camera(), Vec::projectOnAxis(), AxisPlaneConstraint::rotationConstraintDirection(), AxisPlaneConstraint::rotationConstraintType(), and Frame::transformOf().
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 AxisPlaneConstraint.
Definition at line 242 of file constraint.cpp.
References CameraConstraint::camera(), Camera::frame(), Frame::inverseTransformOf(), Vec::projectOnAxis(), Vec::projectOnPlane(), Frame::referenceFrame(), Frame::transformOf(), AxisPlaneConstraint::translationConstraintDirection(), and AxisPlaneConstraint::translationConstraintType().
The documentation for this class was generated from the following files:
- worldsim/3rdParts/qglviewer/constraint.h
- worldsim/3rdParts/qglviewer/constraint.cpp