Easy3D 2.5.3
|
An AxisPlaneConstraint defined in the camera coordinate system. More...
#include <easy3d/renderer/constraint.h>
Public Member Functions | |
CameraConstraint (const Camera *const camera) | |
~CameraConstraint () override=default | |
void | constrainTranslation (vec3 &translation, Frame *const frame) override |
void | constrainRotation (quat &rotation, Frame *const frame) override |
const Camera * | camera () const |
Public Member Functions inherited from AxisPlaneConstraint | |
AxisPlaneConstraint () | |
~AxisPlaneConstraint () override=default | |
void | setTranslationConstraint (Type type, const vec3 &direction) |
void | setTranslationConstraintType (Type type) |
void | setTranslationConstraintDirection (const vec3 &direction) |
Type | translationConstraintType () const |
vec3 | translationConstraintDirection () const |
void | setRotationConstraint (Type type, const vec3 &direction) |
void | setRotationConstraintType (Type type) |
void | setRotationConstraintDirection (const vec3 &direction) |
Type | rotationConstraintType () const |
vec3 | rotationConstraintDirection () const |
Public Member Functions inherited from Constraint | |
virtual | ~Constraint ()=default |
virtual void | constrainTranslation (vec3 &translation, Frame *const frame) |
virtual void | constrainRotation (quat &rotation, Frame *const frame) |
Additional Inherited Members | |
Public Types inherited from AxisPlaneConstraint | |
enum | Type { FREE , AXIS , PLANE , FORBIDDEN } |
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.
|
explicit |
Creates a CameraConstraint, whose constrained directions are defined in the camera
coordinate system.
|
overridedefault |
Virtual destructor. Empty.
|
inline |
Returns the associated Camera. Set using the CameraConstraint constructor.
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.
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.