Changeset 15 in flair-src for trunk/lib/FlairSimulator/src/unexported/GenericObject.h
- Timestamp:
- Apr 8, 2016, 3:40:57 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSimulator/src/unexported/GenericObject.h
r10 r15 35 35 #include <Vector3D.h> 36 36 37 38 37 #include <aabbox3d.h> 39 38 #include <IMeshSceneNode.h> 40 39 41 namespace irr 42 { 43 class SEvent; 44 namespace scene 45 { 46 class IMesh; 47 class ISceneManager; 48 class ITriangleSelector; 49 class IMetaTriangleSelector; 50 class ISceneNodeAnimatorCollisionResponse; 51 } 40 namespace irr { 41 class SEvent; 42 namespace scene { 43 class IMesh; 44 class ISceneManager; 45 class ITriangleSelector; 46 class IMetaTriangleSelector; 47 class ISceneNodeAnimatorCollisionResponse; 48 } 52 49 } 53 50 … … 55 52 class Simulator_impl; 56 53 57 namespace flair 58 { 59 namespace core 60 { 54 namespace flair { 55 namespace core { 61 56 class ConditionVariable; 62 57 } 63 namespace simulator 64 { 58 namespace simulator { 65 59 class Simulator; 66 60 class AnimPoursuite; 67 61 68 class GenericObject : public irr::scene::IMeshSceneNode 69 { 70 friend class ::Simulator_impl; 62 class GenericObject : public irr::scene::IMeshSceneNode { 63 friend class ::Simulator_impl; 71 64 72 65 public: 73 GenericObject(Simulator* parent,std::string name, irr::scene::ISceneManager* sceneManager); 74 virtual ~GenericObject(); 66 GenericObject(Simulator *parent, std::string name, 67 irr::scene::ISceneManager *sceneManager); 68 virtual ~GenericObject(); 75 69 76 //FROM IMPL77 irr::scene::ITriangleSelector*TriangleSelector(void);78 79 //END FROM IMPL70 // FROM IMPL 71 irr::scene::ITriangleSelector *TriangleSelector(void); 72 irr::core::aabbox3d<irr::f32> box; 73 // END FROM IMPL 80 74 81 irr::scene::ISceneNode* getSceneNode(); 82 virtual const irr::core::aabbox3d<irr::f32>& getBoundingBox(void) const 83 { 84 return box; 85 } 75 irr::scene::ISceneNode *getSceneNode(); 76 virtual const irr::core::aabbox3d<irr::f32> &getBoundingBox(void) const { 77 return box; 78 } 86 79 87 void setPosition(irr::core::vector3df position); 88 void setScale(float value); 89 void setScale(irr::core::vector3df scale); 90 void setRotation(irr::core::vector3df rotation); 91 void OnRegisterSceneNode(void); 92 void setMesh(irr::scene::IMesh* mesh); 93 irr::scene::IMesh* getMesh(void); 94 void render(void); 95 virtual void setReadOnlyMaterials(bool readonly){}; 96 virtual bool isReadOnlyMaterials(void) const 97 { 98 return false; 99 } 100 virtual irr::scene::IShadowVolumeSceneNode* addShadowVolumeSceneNode(const irr::scene::IMesh* shadowMesh=0, 101 irr::s32 id=-1, bool zfailmethod=true, irr::f32 infinity=1000.0f) 102 { 103 return NULL; 104 } 80 void setPosition(irr::core::vector3df position); 81 void setScale(float value); 82 void setScale(irr::core::vector3df scale); 83 void setRotation(irr::core::vector3df rotation); 84 void OnRegisterSceneNode(void); 85 void setMesh(irr::scene::IMesh *mesh); 86 irr::scene::IMesh *getMesh(void); 87 void render(void); 88 virtual void setReadOnlyMaterials(bool readonly){}; 89 virtual bool isReadOnlyMaterials(void) const { return false; } 90 virtual irr::scene::IShadowVolumeSceneNode * 91 addShadowVolumeSceneNode(const irr::scene::IMesh *shadowMesh = 0, 92 irr::s32 id = -1, bool zfailmethod = true, 93 irr::f32 infinity = 1000.0f) { 94 return NULL; 95 } 105 96 106 97 private: 107 void UpdateFrom(core::io_data *data) {}; 108 irr::scene::IMesh *mesh; 109 irr::scene::ITriangleSelector* selector; 110 flair::core::ConditionVariable* cond; 111 irr::video::SMaterial Material; 112 98 void UpdateFrom(core::io_data *data){}; 99 irr::scene::IMesh *mesh; 100 irr::scene::ITriangleSelector *selector; 101 flair::core::ConditionVariable *cond; 102 irr::video::SMaterial Material; 113 103 }; 114 104 } // end namespace simulator
Note:
See TracChangeset
for help on using the changeset viewer.