[9] | 1 | // %flair:license{
|
---|
[13] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[9] | 4 | // %flair:license}
|
---|
[8] | 5 | // created: 2012/08/22
|
---|
| 6 | // filename: MeshSceneNode.h
|
---|
| 7 | //
|
---|
| 8 | // author: Guillaume Sanahuja
|
---|
| 9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 10 | //
|
---|
| 11 | // version: $Id: $
|
---|
| 12 | //
|
---|
| 13 | // purpose: classe definissant un IMeshSceneNode
|
---|
| 14 | //
|
---|
| 15 | /*********************************************************************/
|
---|
| 16 |
|
---|
| 17 | #ifndef MESHSCENENODE_H
|
---|
| 18 | #define MESHSCENENODE_H
|
---|
| 19 |
|
---|
| 20 | #include <IMeshSceneNode.h>
|
---|
| 21 |
|
---|
[13] | 22 | namespace flair {
|
---|
| 23 | namespace simulator {
|
---|
| 24 | class Model;
|
---|
[8] | 25 |
|
---|
[13] | 26 | class MeshSceneNode : public irr::scene::IMeshSceneNode {
|
---|
| 27 | public:
|
---|
| 28 | MeshSceneNode(
|
---|
| 29 | Model *parent, irr::scene::IMesh *mesh,
|
---|
| 30 | const irr::core::vector3df &position = irr::core::vector3df(0, 0, 0),
|
---|
| 31 | const irr::core::vector3df &rotation = irr::core::vector3df(0, 0, 0),
|
---|
| 32 | irr::video::ITexture *texture = NULL, irr::s32 id = -1);
|
---|
[8] | 33 |
|
---|
[13] | 34 | virtual void OnRegisterSceneNode(void);
|
---|
| 35 | virtual void render(void);
|
---|
| 36 | virtual const irr::core::aabbox3d<irr::f32> &getBoundingBox() const {
|
---|
| 37 | return Box;
|
---|
| 38 | }
|
---|
| 39 | virtual irr::u32 getMaterialCount(void) const { return 1; }
|
---|
| 40 | virtual irr::video::SMaterial &getMaterial(irr::u32 i);
|
---|
| 41 | virtual void setMesh(irr::scene::IMesh *ptr);
|
---|
| 42 | virtual irr::scene::IMesh *getMesh(void);
|
---|
| 43 | virtual void setReadOnlyMaterials(bool readonly);
|
---|
| 44 | virtual bool isReadOnlyMaterials(void) const { return false; }
|
---|
| 45 | virtual irr::scene::IShadowVolumeSceneNode *
|
---|
| 46 | addShadowVolumeSceneNode(const irr::scene::IMesh *shadowMesh = 0,
|
---|
| 47 | irr::s32 id = -1, bool zfailmethod = true,
|
---|
| 48 | irr::f32 infinity = 1000.0f) {
|
---|
| 49 | return NULL;
|
---|
| 50 | }
|
---|
[8] | 51 |
|
---|
[13] | 52 | private:
|
---|
| 53 | irr::scene::IMesh *mesh;
|
---|
| 54 | irr::core::aabbox3d<irr::f32> Box;
|
---|
| 55 | irr::video::SMaterial Material;
|
---|
| 56 | };
|
---|
[8] | 57 | } // end namespace simulator
|
---|
| 58 | } // end namespace flair
|
---|
| 59 |
|
---|
| 60 | #endif // MESHSCENENODE_H
|
---|