aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/CCubeSceneNode.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/CCubeSceneNode.h186
1 files changed, 93 insertions, 93 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CCubeSceneNode.h b/libraries/irrlicht-1.8/source/Irrlicht/CCubeSceneNode.h
index b676938..0327612 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/CCubeSceneNode.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/CCubeSceneNode.h
@@ -1,93 +1,93 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __C_CUBE_SCENE_NODE_H_INCLUDED__ 5#ifndef __C_CUBE_SCENE_NODE_H_INCLUDED__
6#define __C_CUBE_SCENE_NODE_H_INCLUDED__ 6#define __C_CUBE_SCENE_NODE_H_INCLUDED__
7 7
8#include "IMeshSceneNode.h" 8#include "IMeshSceneNode.h"
9#include "SMesh.h" 9#include "SMesh.h"
10 10
11namespace irr 11namespace irr
12{ 12{
13namespace scene 13namespace scene
14{ 14{
15 class CCubeSceneNode : public IMeshSceneNode 15 class CCubeSceneNode : public IMeshSceneNode
16 { 16 {
17 public: 17 public:
18 18
19 //! constructor 19 //! constructor
20 CCubeSceneNode(f32 size, ISceneNode* parent, ISceneManager* mgr, s32 id, 20 CCubeSceneNode(f32 size, ISceneNode* parent, ISceneManager* mgr, s32 id,
21 const core::vector3df& position = core::vector3df(0,0,0), 21 const core::vector3df& position = core::vector3df(0,0,0),
22 const core::vector3df& rotation = core::vector3df(0,0,0), 22 const core::vector3df& rotation = core::vector3df(0,0,0),
23 const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f)); 23 const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f));
24 24
25 virtual ~CCubeSceneNode(); 25 virtual ~CCubeSceneNode();
26 26
27 virtual void OnRegisterSceneNode(); 27 virtual void OnRegisterSceneNode();
28 28
29 //! renders the node. 29 //! renders the node.
30 virtual void render(); 30 virtual void render();
31 31
32 //! returns the axis aligned bounding box of this node 32 //! returns the axis aligned bounding box of this node
33 virtual const core::aabbox3d<f32>& getBoundingBox() const; 33 virtual const core::aabbox3d<f32>& getBoundingBox() const;
34 34
35 //! returns the material based on the zero based index i. To get the amount 35 //! returns the material based on the zero based index i. To get the amount
36 //! of materials used by this scene node, use getMaterialCount(). 36 //! of materials used by this scene node, use getMaterialCount().
37 //! This function is needed for inserting the node into the scene hirachy on a 37 //! This function is needed for inserting the node into the scene hirachy on a
38 //! optimal position for minimizing renderstate changes, but can also be used 38 //! optimal position for minimizing renderstate changes, but can also be used
39 //! to directly modify the material of a scene node. 39 //! to directly modify the material of a scene node.
40 virtual video::SMaterial& getMaterial(u32 i); 40 virtual video::SMaterial& getMaterial(u32 i);
41 41
42 //! returns amount of materials used by this scene node. 42 //! returns amount of materials used by this scene node.
43 virtual u32 getMaterialCount() const; 43 virtual u32 getMaterialCount() const;
44 44
45 //! Returns type of the scene node 45 //! Returns type of the scene node
46 virtual ESCENE_NODE_TYPE getType() const { return ESNT_CUBE; } 46 virtual ESCENE_NODE_TYPE getType() const { return ESNT_CUBE; }
47 47
48 //! Creates shadow volume scene node as child of this node 48 //! Creates shadow volume scene node as child of this node
49 //! and returns a pointer to it. 49 //! and returns a pointer to it.
50 virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh, 50 virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh,
51 s32 id, bool zfailmethod=true, f32 infinity=10000.0f); 51 s32 id, bool zfailmethod=true, f32 infinity=10000.0f);
52 52
53 //! Writes attributes of the scene node. 53 //! Writes attributes of the scene node.
54 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; 54 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const;
55 55
56 //! Reads attributes of the scene node. 56 //! Reads attributes of the scene node.
57 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); 57 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
58 58
59 //! Creates a clone of this scene node and its children. 59 //! Creates a clone of this scene node and its children.
60 virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); 60 virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0);
61 61
62 //! Sets a new mesh to display 62 //! Sets a new mesh to display
63 virtual void setMesh(IMesh* mesh) {} 63 virtual void setMesh(IMesh* mesh) {}
64 64
65 //! Returns the current mesh 65 //! Returns the current mesh
66 virtual IMesh* getMesh(void) { return Mesh; } 66 virtual IMesh* getMesh(void) { return Mesh; }
67 67
68 //! Sets if the scene node should not copy the materials of the mesh but use them in a read only style. 68 //! Sets if the scene node should not copy the materials of the mesh but use them in a read only style.
69 /* In this way it is possible to change the materials a mesh causing all mesh scene nodes 69 /* In this way it is possible to change the materials a mesh causing all mesh scene nodes
70 referencing this mesh to change too. */ 70 referencing this mesh to change too. */
71 virtual void setReadOnlyMaterials(bool readonly) {} 71 virtual void setReadOnlyMaterials(bool readonly) {}
72 72
73 //! Returns if the scene node should not copy the materials of the mesh but use them in a read only style 73 //! Returns if the scene node should not copy the materials of the mesh but use them in a read only style
74 virtual bool isReadOnlyMaterials() const { return false; } 74 virtual bool isReadOnlyMaterials() const { return false; }
75 75
76 //! Removes a child from this scene node. 76 //! Removes a child from this scene node.
77 //! Implemented here, to be able to remove the shadow properly, if there is one, 77 //! Implemented here, to be able to remove the shadow properly, if there is one,
78 //! or to remove attached childs. 78 //! or to remove attached childs.
79 virtual bool removeChild(ISceneNode* child); 79 virtual bool removeChild(ISceneNode* child);
80 80
81 private: 81 private:
82 void setSize(); 82 void setSize();
83 83
84 IMesh* Mesh; 84 IMesh* Mesh;
85 IShadowVolumeSceneNode* Shadow; 85 IShadowVolumeSceneNode* Shadow;
86 f32 Size; 86 f32 Size;
87 }; 87 };
88 88
89} // end namespace scene 89} // end namespace scene
90} // end namespace irr 90} // end namespace irr
91 91
92#endif 92#endif
93 93