AnimaL |
Tutorial |
Documentation |
#include <picking.h>
Inheritance diagram for animal::ConstrainedItem:
This base class does nothing. It has to be derived and implemented. The constraint remains until the ConstrainedItem is deleted. ConstrainedItems are used to notify constraints to an engine, not to apply the constraints directly. It is the engine's job to enforce the constraint, and to keep enforcing it until the ConstrainedItem is deleted. See, for instance, the ConstrainedPoint class derived in the MassSpringEngine.
Definition at line 13 of file picking.h.
Public Member Functions | |
virtual void | getPoint (float &, float &, float &) const |
Get the current 3D position of the selected object. | |
virtual void | moveTo (float, float, float) |
Constrain the selected object to the given 3D position. | |
virtual | ~ConstrainedItem () |
The destructor removes the constraint. | |
virtual void | print () const |
Print (for debug only). | |
virtual bool | operator== (const ConstrainedItem *) const=0 |
Comparison of a given ConstrainedItem pointer with the current ConstrainedItem. | |
virtual void | draw () |
|
The destructor removes the constraint.
|
|
Reimplemented in animal::octree::ManipulatedMeshVertex. Definition at line 33 of file picking.h. Referenced by X3DTK::Qt::Viewer::draw(). |
|
Get the current 3D position of the selected object.
Reimplemented in animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::ConstrainedPoint, and animal::octree::ManipulatedMeshVertex. Definition at line 17 of file picking.h. Referenced by X3DTK::Qt::Viewer::mousePressEvent(). |
|
Constrain the selected object to the given 3D position. Then the engine which manages the selected object has to maintain it there until the ConstrainedItem is deleted. Reimplemented in animal::octree::ManipulatedMeshVertex, and animal::octree::ManipulatedMeshVertexAnimated< t_Vector, t_Real, t_VecReal >. Definition at line 21 of file picking.h. Referenced by X3DTK::Qt::Viewer::mouseMoveEvent(), and X3DTK::Qt::Viewer::mousePressEvent(). |
|
Comparison of a given ConstrainedItem pointer with the current ConstrainedItem. True iff the given pointer points to an ConstrainedItem which represents the same element. This method is used to avoid attaching several manipulators to the same object. Implemented in animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::ConstrainedPoint, and animal::octree::ManipulatedMeshVertex. |
|
Print (for debug only).
Reimplemented in animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::ConstrainedPoint. Definition at line 27 of file picking.h. Referenced by X3DTK::Qt::Viewer::mousePressEvent(). |