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 | #include <aabbox3d.h>
|
---|
38 | #include <IMeshSceneNode.h>
|
---|
39 |
|
---|
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 | }
|
---|
49 | }
|
---|
50 |
|
---|
51 | class Gui_impl;
|
---|
52 | class Simulator_impl;
|
---|
53 |
|
---|
54 | namespace flair {
|
---|
55 | namespace core {
|
---|
56 | class ConditionVariable;
|
---|
57 | }
|
---|
58 | namespace simulator {
|
---|
59 | class Simulator;
|
---|
60 | class AnimPoursuite;
|
---|
61 |
|
---|
62 | class GenericObject : public irr::scene::IMeshSceneNode {
|
---|
63 | friend class ::Simulator_impl;
|
---|
64 |
|
---|
65 | public:
|
---|
66 | GenericObject(Simulator *parent, std::string name,
|
---|
67 | irr::scene::ISceneManager *sceneManager);
|
---|
68 | virtual ~GenericObject();
|
---|
69 |
|
---|
70 | // FROM IMPL
|
---|
71 | irr::scene::ITriangleSelector *TriangleSelector(void);
|
---|
72 | irr::core::aabbox3d<irr::f32> box;
|
---|
73 | // END FROM IMPL
|
---|
74 |
|
---|
75 | irr::scene::ISceneNode *getSceneNode();
|
---|
76 | virtual const irr::core::aabbox3d<irr::f32> &getBoundingBox(void) const {
|
---|
77 | return box;
|
---|
78 | }
|
---|
79 |
|
---|
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 | }
|
---|
96 |
|
---|
97 | private:
|
---|
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;
|
---|
103 | };
|
---|
104 | } // end namespace simulator
|
---|
105 | } // end namespace flair
|
---|
106 | #endif // GL
|
---|
107 | #endif // GENERICOBJECT_H
|
---|