Documentation


animal::Engine Class Reference

#include <engine.h>

Inheritance diagram for animal::Engine:

animal::EngineGroup animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real > animal::MassSpringEngine< X3DTK::MFFloat, X3DTK::MFVec3f, X3DTK::MFFloat, X3DTK::MFInt32, X3DTK::MFVec3f, float > animal::MorphingEngine< Morphings, Real > animal::MorphingEngine< Morphings, X3DTK::SFFloat > animal::octree::OctreeEngine X3DTK::X3D::FrameNode X3DTK::X3D::AnimalEngineNode< AMassSpringEngine > X3DTK::X3D::AnimalEngineNode< AMorphingEngine > animal::octree::OctreeODEEngine X3DTK::X3D::MassSpringNode X3DTK::X3D::MorphingNode animal::octree::OctreeSpringEngine List of all members.

Detailed Description

Abstract base class to represent an animation concept.

For example, an engine can be animal::KeyFrameEngine, animal::MassSpringEngine...

This engine can be moved Engine::move(), initialized Engine::init(), drawn Engine::draw() and thus has a bounding box Engine::getBoundingBox().

It can handle key and mouse events animal::Event.

Definition at line 24 of file engine.h.

Public Member Functions

 Engine ()
 Constructor.

virtual void init ()
 Init the engine and call reset(). Is done only one time.

virtual void reset ()
 Initialize the animation.

virtual void postReset ()
 Initialize the animation.

virtual void move (double)
 Move the engine.

virtual void postMove (double)
 Move the engine (called after move).

virtual void draw ()
 Draw the engine.

virtual void getBoundingBox (float &minX, float &minY, float &minZ, float &maxX, float &maxY, float &maxZ)
 Compute the bounding box of the engine when it can be drawn.

virtual void keyPressEvent (KeyEvent *)
 Deal with key press event.

virtual void mouseDoubleClickEvent (MouseEvent *)
 Deal with mouse double-click event.

virtual void mouseMoveEvent (MouseEvent *)
 Deal with mouse move event.

virtual void mousePressEvent (MouseEvent *)
 Deal with mouse press event.

virtual void mouseReleaseEvent (MouseEvent *)
 Deal with mouse release event.

virtual ConstrainedItempickPoint (float *, float *, float)
 Pick along a line.

void drawBoundingBox ()
 Draw the bounding box.


Static Public Member Functions

Worldworld ()
 Return the animal::Engine::theWorld which gives some external informations.

void setWorld (World *w)
 Ser the animal::Engine::theWorld to get some external informations.


Public Attributes

bool drawBBox
 True when the bounding box is drawn with animal::Engine::drawBoundingBox().

bool drawEngine
 True when the engine is drawn with animal::Engine::draw().

bool moveEngine
 True when the engine is moved with animal::Engine::move().

bool resetEngine
 True when the engine is reset with animal::Engine::init().


Static Private Attributes

WorldtheWorld = NULL
 The world to get some external informations for drawing.


Constructor & Destructor Documentation

animal::Engine::Engine  )  [inline]
 

Constructor.

Definition at line 29 of file engine.h.

References drawBBox, drawEngine, moveEngine, and resetEngine.


Member Function Documentation

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

Draw the engine.

Reimplemented in animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >, animal::MorphingEngine< Morphings, Real >, X3DTK::X3D::FrameNode, X3DTK::X3D::AnimalEngineNode< AMassSpringEngine >, X3DTK::X3D::AnimalEngineNode< AMorphingEngine >, animal::MassSpringEngine< X3DTK::MFFloat, X3DTK::MFVec3f, X3DTK::MFFloat, X3DTK::MFInt32, X3DTK::MFVec3f, float >, and animal::MorphingEngine< Morphings, X3DTK::SFFloat >.

Definition at line 45 of file engine.h.

void animal::Engine::drawBoundingBox  )  [inline]
 

Draw the bounding box.

Definition at line 80 of file engine.h.

References drawBBox, and getBoundingBox().

virtual void animal::Engine::getBoundingBox float &  minX,
float &  minY,
float &  minZ,
float &  maxX,
float &  maxY,
float &  maxZ
[inline, virtual]
 

Compute the bounding box of the engine when it can be drawn.

Reimplemented in animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >, animal::EngineGroup, X3DTK::X3D::FrameNode, and animal::MassSpringEngine< X3DTK::MFFloat, X3DTK::MFVec3f, X3DTK::MFFloat, X3DTK::MFInt32, X3DTK::MFVec3f, float >.

Definition at line 48 of file engine.h.

Referenced by drawBoundingBox().

virtual void animal::Engine::init  )  [inline, virtual]
 

Init the engine and call reset(). Is done only one time.

Reimplemented in animal::octree::OctreeEngine, animal::EngineGroup, X3DTK::X3D::MorphingNode, X3DTK::X3D::FrameNode, X3DTK::X3D::MassSpringNode, X3DTK::X3D::AnimalEngineNode< AMassSpringEngine >, and X3DTK::X3D::AnimalEngineNode< AMorphingEngine >.

Definition at line 32 of file engine.h.

References reset().

Referenced by X3DTK::MainScene::addEngine(), X3DTK::X3D::MassSpringNode::init(), and X3DTK::X3D::FrameNode::init().

virtual void animal::Engine::keyPressEvent KeyEvent  )  [inline, virtual]
 

Deal with key press event.

Definition at line 58 of file engine.h.

virtual void animal::Engine::mouseDoubleClickEvent MouseEvent  )  [inline, virtual]
 

Deal with mouse double-click event.

Reimplemented in X3DTK::X3D::AnimalEngineNode< AMassSpringEngine >, and X3DTK::X3D::AnimalEngineNode< AMorphingEngine >.

Definition at line 60 of file engine.h.

virtual void animal::Engine::mouseMoveEvent MouseEvent  )  [inline, virtual]
 

Deal with mouse move event.

Reimplemented in X3DTK::X3D::AnimalEngineNode< AMassSpringEngine >, and X3DTK::X3D::AnimalEngineNode< AMorphingEngine >.

Definition at line 62 of file engine.h.

virtual void animal::Engine::mousePressEvent MouseEvent  )  [inline, virtual]
 

Deal with mouse press event.

Reimplemented in animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >, X3DTK::X3D::AnimalEngineNode< AMassSpringEngine >, X3DTK::X3D::AnimalEngineNode< AMorphingEngine >, and animal::MassSpringEngine< X3DTK::MFFloat, X3DTK::MFVec3f, X3DTK::MFFloat, X3DTK::MFInt32, X3DTK::MFVec3f, float >.

Definition at line 64 of file engine.h.

virtual void animal::Engine::mouseReleaseEvent MouseEvent  )  [inline, virtual]
 

Deal with mouse release event.

Reimplemented in X3DTK::X3D::AnimalEngineNode< AMassSpringEngine >, and X3DTK::X3D::AnimalEngineNode< AMorphingEngine >.

Definition at line 66 of file engine.h.

virtual void animal::Engine::move double   )  [inline, virtual]
 

Move the engine.

Reimplemented in animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >, animal::MorphingEngine< Morphings, Real >, animal::octree::OctreeEngine, animal::EngineGroup, animal::MassSpringEngine< X3DTK::MFFloat, X3DTK::MFVec3f, X3DTK::MFFloat, X3DTK::MFInt32, X3DTK::MFVec3f, float >, and animal::MorphingEngine< Morphings, X3DTK::SFFloat >.

Definition at line 40 of file engine.h.

virtual ConstrainedItem* animal::Engine::pickPoint float *  ,
float *  ,
float 
[inline, virtual]
 

Pick along a line.

Base implementation does nothing

Reimplemented in animal::EngineGroup, X3DTK::X3D::AnimalEngineNode< AMassSpringEngine >, and X3DTK::X3D::AnimalEngineNode< AMorphingEngine >.

Definition at line 69 of file engine.h.

virtual void animal::Engine::postMove double   )  [inline, virtual]
 

Move the engine (called after move).

Definition at line 42 of file engine.h.

Referenced by X3DTK::X3D::DeformableOctreeNode::postAnimate().

virtual void animal::Engine::postReset  )  [inline, virtual]
 

Initialize the animation.

Reimplemented in X3DTK::X3D::AnimalEngineNode< AMassSpringEngine >, and X3DTK::X3D::AnimalEngineNode< AMorphingEngine >.

Definition at line 37 of file engine.h.

virtual void animal::Engine::reset  )  [inline, virtual]
 

Initialize the animation.

Reimplemented in animal::MassSpringEngine< Inv_Masses, Velocities, SpringStiffness, IndexedSprings, Points, Real >, animal::MorphingEngine< Morphings, Real >, animal::EngineGroup, X3DTK::X3D::AnimalEngineNode< AMassSpringEngine >, X3DTK::X3D::AnimalEngineNode< AMorphingEngine >, animal::MassSpringEngine< X3DTK::MFFloat, X3DTK::MFVec3f, X3DTK::MFFloat, X3DTK::MFInt32, X3DTK::MFVec3f, float >, and animal::MorphingEngine< Morphings, X3DTK::SFFloat >.

Definition at line 35 of file engine.h.

Referenced by init().

void animal::Engine::setWorld World w  )  [inline, static]
 

Ser the animal::Engine::theWorld to get some external informations.

Definition at line 77 of file engine.h.

References theWorld.

Referenced by MainController::MainController().

World* animal::Engine::world  )  [inline, static]
 

Return the animal::Engine::theWorld which gives some external informations.

Definition at line 74 of file engine.h.

References theWorld.


Member Data Documentation

bool animal::Engine::drawBBox
 

True when the bounding box is drawn with animal::Engine::drawBoundingBox().

Definition at line 100 of file engine.h.

Referenced by drawBoundingBox(), and Engine().

bool animal::Engine::drawEngine
 

True when the engine is drawn with animal::Engine::draw().

Definition at line 102 of file engine.h.

Referenced by Engine().

bool animal::Engine::moveEngine
 

True when the engine is moved with animal::Engine::move().

Definition at line 104 of file engine.h.

Referenced by Engine().

bool animal::Engine::resetEngine
 

True when the engine is reset with animal::Engine::init().

Definition at line 106 of file engine.h.

Referenced by Engine().

animal::World * animal::Engine::theWorld = NULL [static, private]
 

The world to get some external informations for drawing.

For exemple the camera position and orientaion. It is defined and set in the MainController with the X3DTK-Qt architecture.

Definition at line 31 of file MainController.cpp.

Referenced by setWorld(), and world().


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