AnimaL |
Tutorial |
Documentation |
00001 // 00002 // C++ Interface: AnimalEngineNode 00003 // 00004 // Description: 00005 // 00006 // 00007 // Author: François Faure, (C) 2004 00008 // 00009 // Copyright: See COPYING file that comes with this distribution 00010 // 00011 // 00012 #ifndef X3DTK_X3DAnimalEngineNode_h 00013 #define X3DTK_X3DAnimalEngineNode_h 00014 00015 //#include <EngineNode.h> 00016 #include <animal/engine/EngineNode.h> 00017 #include <animal/X3DTK/X4DNode.h> 00018 00019 namespace X3DTK { 00020 00021 namespace X3D { 00022 00028 template<class AnimalEngine> 00029 class AnimalEngineNode : public EngineNode, public AnimalEngine 00030 { 00031 public: 00032 typedef AnimalEngine Engine; 00033 00034 AnimalEngineNode(); 00035 00036 virtual ~AnimalEngineNode(); 00037 00038 //virtual SFNode clone(){ return new AnimalEngineNode(*this); } 00039 00044 virtual void draw(); 00045 00046 // virtual void updateBoundingBox(); 00047 00048 // /*! 00049 // \fn X3DTK::X3D::AnimalEngineNode::drawBoundingBox() 00050 // Draw the bounding box of the engine. 00051 // */ 00052 // virtual void drawBoundingBox(); 00053 00054 // /*! 00055 // \fn X3DTK::X3D::AnimalEngineNode::getBoundingBox( float& xmin, float& ymin, float& zmin, float& xmax, float& ymax, float& zmax ) 00056 // Compute the bounding box of the engine. 00057 // */ 00058 // virtual void getBoundingBox( float& xmin, float& ymin, float& zmin, float& xmax, float& ymax, float& zmax ); 00059 00064 virtual void init(); 00065 00066 00067 virtual void reset(); 00068 00069 virtual void postReset(); 00070 00075 virtual void keyPressedEvent( animal::KeyEvent* e ); 00076 00078 virtual void mouseDoubleClickEvent(animal::MouseEvent * e); 00080 virtual void mouseMoveEvent(animal::MouseEvent *e); 00082 virtual void mousePressEvent(animal::MouseEvent *e); 00084 virtual void mouseReleaseEvent(animal::MouseEvent *e); 00086 virtual animal::ConstrainedItem* pickPoint( float* orig, float* dir, float thresh ); 00087 virtual void animate(float dt); 00088 virtual void postAnimate(float dt); 00089 00090 }; 00091 00092 00093 } 00094 00095 } 00096 00097 #endif