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

Last change on this file since 27 was 15, checked in by Bayard Gildas, 9 years ago

sources reformatted with flair-format-dir script

File size: 2.7 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#include <aabbox3d.h>
38#include <IMeshSceneNode.h>
39
40namespace irr {
41class SEvent;
42namespace scene {
43class IMesh;
44class ISceneManager;
45class ITriangleSelector;
46class IMetaTriangleSelector;
47class ISceneNodeAnimatorCollisionResponse;
48}
49}
50
51class Gui_impl;
52class Simulator_impl;
53
54namespace flair {
55namespace core {
56class ConditionVariable;
57}
58namespace simulator {
59class Simulator;
60class AnimPoursuite;
61
62class GenericObject : public irr::scene::IMeshSceneNode {
63 friend class ::Simulator_impl;
64
65public:
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
97private:
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
Note: See TracBrowser for help on using the repository browser.