source: flair-src/branches/sanscv/lib/FlairSimulator/src/MeshSceneNode.h@ 360

Last change on this file since 360 was 324, checked in by Sanahuja Guillaume, 5 years ago

removing opencv dependency

File size: 2.1 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: 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
22namespace flair {
23namespace simulator {
24class Model;
25
26class MeshSceneNode : public irr::scene::IMeshSceneNode {
27public:
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);
33
34 MeshSceneNode(
35 irr::scene::ISceneNode *parent, irr::scene::IMesh *mesh,
36 const irr::core::vector3df &position = irr::core::vector3df(0, 0, 0),
37 const irr::core::vector3df &rotation = irr::core::vector3df(0, 0, 0),
38 irr::video::ITexture *texture = NULL, irr::s32 id = -1);
39
40 virtual void OnRegisterSceneNode(void);
41 virtual void render(void);
42 virtual const irr::core::aabbox3d<irr::f32> &getBoundingBox() const {
43 return Box;
44 }
45 virtual irr::u32 getMaterialCount(void) const { return 1; }
46 virtual irr::video::SMaterial &getMaterial(irr::u32 i);
47 virtual void setMesh(irr::scene::IMesh *ptr);
48 virtual irr::scene::IMesh *getMesh(void);
49 virtual void setReadOnlyMaterials(bool readonly);
50 virtual bool isReadOnlyMaterials(void) const { return false; }
51 virtual irr::scene::IShadowVolumeSceneNode *
52 addShadowVolumeSceneNode(const irr::scene::IMesh *shadowMesh = 0,
53 irr::s32 id = -1, bool zfailmethod = true,
54 irr::f32 infinity = 1000.0f) {
55 return NULL;
56 }
57
58private:
59 irr::scene::IMesh *mesh;
60 irr::core::aabbox3d<irr::f32> Box;
61 irr::video::SMaterial Material;
62};
63} // end namespace simulator
64} // end namespace flair
65
66#endif // MESHSCENENODE_H
Note: See TracBrowser for help on using the repository browser.