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

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

lic

File size: 2.8 KB
Line 
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
41namespace 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
54class Gui_impl;
55class Simulator_impl;
56
57namespace flair
58{
59namespace core
60{
61class ConditionVariable;
62}
63namespace simulator
64{
65class Simulator;
66class AnimPoursuite;
67
68class GenericObject : public irr::scene::IMeshSceneNode
69{
70 friend class ::Simulator_impl;
71
72public:
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
106private:
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
Note: See TracBrowser for help on using the repository browser.