Documentation


animal::ConstrainedItem Class Reference

#include <picking.h>

Inheritance diagram for animal::ConstrainedItem:

animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >::ConstrainedPoint animal::octree::ManipulatedMeshVertex animal::octree::ManipulatedMeshVertexAnimated< t_Vector, t_Real, t_VecReal > List of all members.

Detailed Description

Models something which can be selected and moved interactively.

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 ()


Constructor & Destructor Documentation

virtual animal::ConstrainedItem::~ConstrainedItem  )  [inline, virtual]
 

The destructor removes the constraint.

Definition at line 24 of file picking.h.


Member Function Documentation

virtual void animal::ConstrainedItem::draw  )  [inline, virtual]
 

Reimplemented in animal::octree::ManipulatedMeshVertex.

Definition at line 33 of file picking.h.

Referenced by X3DTK::Qt::Viewer::draw().

virtual void animal::ConstrainedItem::getPoint float &  ,
float &  ,
float & 
const [inline, virtual]
 

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().

virtual void animal::ConstrainedItem::moveTo float  ,
float  ,
float 
[inline, virtual]
 

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().

virtual bool animal::ConstrainedItem::operator== const ConstrainedItem  )  const [pure virtual]
 

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.

virtual void animal::ConstrainedItem::print  )  const [inline, virtual]
 

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().


The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:52:30 2004 by doxygen 1.3.6