1 | // %flair:license{
|
---|
2 | // This file is part of the Flair framework distributed under the
|
---|
3 | // CECILL-C License, Version 1.0.
|
---|
4 | // %flair:license}
|
---|
5 | // created: 2013/03/25
|
---|
6 | // filename: GenericObject.h
|
---|
7 | //
|
---|
8 | // author: Cesar Richard
|
---|
9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
10 | //
|
---|
11 | // version: $Id: $
|
---|
12 | //
|
---|
13 | // purpose: classe definissant un modele a simuler
|
---|
14 | //
|
---|
15 | /*********************************************************************/
|
---|
16 |
|
---|
17 | #ifndef GENERICOBJECT_H
|
---|
18 | #define GENERICOBJECT_H
|
---|
19 | #ifdef GL
|
---|
20 |
|
---|
21 | #include "Simulator.h"
|
---|
22 |
|
---|
23 | #include "ConditionVariable.h"
|
---|
24 | #include "Gui.h"
|
---|
25 | #include "Gui_impl.h"
|
---|
26 | #include <ISceneManager.h>
|
---|
27 | #include <ISceneNodeAnimatorCollisionResponse.h>
|
---|
28 | #include <IMetaTriangleSelector.h>
|
---|
29 | #include <IVideoDriver.h>
|
---|
30 | #include <ICameraSceneNode.h>
|
---|
31 | #include "AnimPoursuite.h"
|
---|
32 |
|
---|
33 | #include <IODevice.h>
|
---|
34 | #include <Euler.h>
|
---|
35 | #include <Vector3D.h>
|
---|
36 |
|
---|
37 |
|
---|
38 | #include <aabbox3d.h>
|
---|
39 | #include <IMeshSceneNode.h>
|
---|
40 |
|
---|
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 | }
|
---|
52 | }
|
---|
53 |
|
---|
54 | class Gui_impl;
|
---|
55 | class Simulator_impl;
|
---|
56 |
|
---|
57 | namespace flair
|
---|
58 | {
|
---|
59 | namespace core
|
---|
60 | {
|
---|
61 | class ConditionVariable;
|
---|
62 | }
|
---|
63 | namespace simulator
|
---|
64 | {
|
---|
65 | class Simulator;
|
---|
66 | class AnimPoursuite;
|
---|
67 |
|
---|
68 | class GenericObject : public irr::scene::IMeshSceneNode
|
---|
69 | {
|
---|
70 | friend class ::Simulator_impl;
|
---|
71 |
|
---|
72 | public:
|
---|
73 | GenericObject(Simulator* parent,std::string name, irr::scene::ISceneManager* sceneManager);
|
---|
74 | virtual ~GenericObject();
|
---|
75 |
|
---|
76 | //FROM IMPL
|
---|
77 | irr::scene::ITriangleSelector* TriangleSelector(void);
|
---|
78 | irr::core::aabbox3d<irr::f32> box;
|
---|
79 | //END FROM IMPL
|
---|
80 |
|
---|
81 | irr::scene::ISceneNode* getSceneNode();
|
---|
82 | virtual const irr::core::aabbox3d<irr::f32>& getBoundingBox(void) const
|
---|
83 | {
|
---|
84 | return box;
|
---|
85 | }
|
---|
86 |
|
---|
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 | }
|
---|
105 |
|
---|
106 | 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 |
|
---|
113 | };
|
---|
114 | } // end namespace simulator
|
---|
115 | } // end namespace flair
|
---|
116 | #endif // GL
|
---|
117 | #endif // GENERICOBJECT_H
|
---|