source: flair-src/trunk/lib/FlairSimulator/src/unexported/GenericObject.h@ 8

Last change on this file since 8 was 8, checked in by Sanahuja Guillaume, 6 years ago

simulator

File size: 2.6 KB
Line 
1// created: 2013/03/25
2// filename: GenericObject.h
3//
4// author: Cesar Richard
5// Copyright Heudiasyc UMR UTC/CNRS 7253
6//
7// version: $Id: $
8//
9// purpose: classe definissant un modele a simuler
10//
11/*********************************************************************/
12
13#ifndef GENERICOBJECT_H
14#define GENERICOBJECT_H
15#ifdef GL
16
17#include "Simulator.h"
18
19#include "ConditionVariable.h"
20#include "Gui.h"
21#include "Gui_impl.h"
22#include <ISceneManager.h>
23#include <ISceneNodeAnimatorCollisionResponse.h>
24#include <IMetaTriangleSelector.h>
25#include <IVideoDriver.h>
26#include <ICameraSceneNode.h>
27#include "AnimPoursuite.h"
28
29#include <IODevice.h>
30#include <Euler.h>
31#include <Vector3D.h>
32
33
34#include <aabbox3d.h>
35#include <IMeshSceneNode.h>
36
37namespace irr
38{
39 class SEvent;
40 namespace scene
41 {
42 class IMesh;
43 class ISceneManager;
44 class ITriangleSelector;
45 class IMetaTriangleSelector;
46 class ISceneNodeAnimatorCollisionResponse;
47 }
48}
49
50class Gui_impl;
51class Simulator_impl;
52
53namespace flair
54{
55namespace core
56{
57class ConditionVariable;
58}
59namespace simulator
60{
61class Simulator;
62class AnimPoursuite;
63
64class GenericObject : public irr::scene::IMeshSceneNode
65{
66 friend class ::Simulator_impl;
67
68public:
69 GenericObject(Simulator* parent,std::string name, irr::scene::ISceneManager* sceneManager);
70 virtual ~GenericObject();
71
72 //FROM IMPL
73 irr::scene::ITriangleSelector* TriangleSelector(void);
74 irr::core::aabbox3d<irr::f32> box;
75 //END FROM IMPL
76
77 irr::scene::ISceneNode* getSceneNode();
78 virtual const irr::core::aabbox3d<irr::f32>& getBoundingBox(void) const
79 {
80 return box;
81 }
82
83 void setPosition(irr::core::vector3df position);
84 void setScale(float value);
85 void setScale(irr::core::vector3df scale);
86 void setRotation(irr::core::vector3df rotation);
87 void OnRegisterSceneNode(void);
88 void setMesh(irr::scene::IMesh* mesh);
89 irr::scene::IMesh* getMesh(void);
90 void render(void);
91 virtual void setReadOnlyMaterials(bool readonly){};
92 virtual bool isReadOnlyMaterials(void) const
93 {
94 return false;
95 }
96 virtual irr::scene::IShadowVolumeSceneNode* addShadowVolumeSceneNode(const irr::scene::IMesh* shadowMesh=0,
97 irr::s32 id=-1, bool zfailmethod=true, irr::f32 infinity=1000.0f)
98 {
99 return NULL;
100 }
101
102private:
103 void UpdateFrom(core::io_data *data) {};
104 irr::scene::IMesh *mesh;
105 irr::scene::ITriangleSelector* selector;
106 flair::core::ConditionVariable* cond;
107 irr::video::SMaterial Material;
108
109};
110} // end namespace simulator
111} // end namespace flair
112#endif // GL
113#endif // GENERICOBJECT_H
Note: See TracBrowser for help on using the repository browser.