aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/COctreeSceneNode.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/source/Irrlicht/COctreeSceneNode.h
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/COctreeSceneNode.h')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/COctreeSceneNode.h230
1 files changed, 115 insertions, 115 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/COctreeSceneNode.h b/libraries/irrlicht-1.8/source/Irrlicht/COctreeSceneNode.h
index 203be70..eee9ee2 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/COctreeSceneNode.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/COctreeSceneNode.h
@@ -1,115 +1,115 @@
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_OCTREE_SCENE_NODE_H_INCLUDED__ 5#ifndef __C_OCTREE_SCENE_NODE_H_INCLUDED__
6#define __C_OCTREE_SCENE_NODE_H_INCLUDED__ 6#define __C_OCTREE_SCENE_NODE_H_INCLUDED__
7 7
8#include "IMeshSceneNode.h" 8#include "IMeshSceneNode.h"
9#include "Octree.h" 9#include "Octree.h"
10 10
11namespace irr 11namespace irr
12{ 12{
13namespace scene 13namespace scene
14{ 14{
15 //! implementation of the IBspTreeSceneNode 15 //! implementation of the IBspTreeSceneNode
16 class COctreeSceneNode : public IMeshSceneNode 16 class COctreeSceneNode : public IMeshSceneNode
17 { 17 {
18 public: 18 public:
19 19
20 //! constructor 20 //! constructor
21 COctreeSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, 21 COctreeSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
22 s32 minimalPolysPerNode=512); 22 s32 minimalPolysPerNode=512);
23 23
24 //! destructor 24 //! destructor
25 virtual ~COctreeSceneNode(); 25 virtual ~COctreeSceneNode();
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 //! creates the tree 35 //! creates the tree
36 bool createTree(IMesh* mesh); 36 bool createTree(IMesh* mesh);
37 37
38 //! returns the material based on the zero based index i. To get the amount 38 //! returns the material based on the zero based index i. To get the amount
39 //! of materials used by this scene node, use getMaterialCount(). 39 //! of materials used by this scene node, use getMaterialCount().
40 //! This function is needed for inserting the node into the scene hirachy on a 40 //! This function is needed for inserting the node into the scene hirachy on a
41 //! optimal position for minimizing renderstate changes, but can also be used 41 //! optimal position for minimizing renderstate changes, but can also be used
42 //! to directly modify the material of a scene node. 42 //! to directly modify the material of a scene node.
43 virtual video::SMaterial& getMaterial(u32 i); 43 virtual video::SMaterial& getMaterial(u32 i);
44 44
45 //! returns amount of materials used by this scene node. 45 //! returns amount of materials used by this scene node.
46 virtual u32 getMaterialCount() const; 46 virtual u32 getMaterialCount() const;
47 47
48 //! Writes attributes of the scene node. 48 //! Writes attributes of the scene node.
49 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; 49 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const;
50 50
51 //! Reads attributes of the scene node. 51 //! Reads attributes of the scene node.
52 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); 52 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
53 53
54 //! Returns type of the scene node 54 //! Returns type of the scene node
55 virtual ESCENE_NODE_TYPE getType() const { return ESNT_OCTREE; } 55 virtual ESCENE_NODE_TYPE getType() const { return ESNT_OCTREE; }
56 56
57 //! Sets a new mesh to display 57 //! Sets a new mesh to display
58 virtual void setMesh(IMesh* mesh); 58 virtual void setMesh(IMesh* mesh);
59 59
60 //! Get the currently defined mesh for display. 60 //! Get the currently defined mesh for display.
61 virtual IMesh* getMesh(void); 61 virtual IMesh* getMesh(void);
62 62
63 //! Sets if the scene node should not copy the materials of the mesh but use them in a read only style. 63 //! Sets if the scene node should not copy the materials of the mesh but use them in a read only style.
64 virtual void setReadOnlyMaterials(bool readonly); 64 virtual void setReadOnlyMaterials(bool readonly);
65 65
66 //! Check if the scene node should not copy the materials of the mesh but use them in a read only style 66 //! Check if the scene node should not copy the materials of the mesh but use them in a read only style
67 virtual bool isReadOnlyMaterials() const; 67 virtual bool isReadOnlyMaterials() const;
68 68
69 //! Creates shadow volume scene node as child of this node 69 //! Creates shadow volume scene node as child of this node
70 //! and returns a pointer to it. 70 //! and returns a pointer to it.
71 virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh, 71 virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh,
72 s32 id, bool zfailmethod=true, f32 infinity=10000.0f); 72 s32 id, bool zfailmethod=true, f32 infinity=10000.0f);
73 73
74 //! Removes a child from this scene node. 74 //! Removes a child from this scene node.
75 //! Implemented here, to be able to remove the shadow properly, if there is one, 75 //! Implemented here, to be able to remove the shadow properly, if there is one,
76 //! or to remove attached childs. 76 //! or to remove attached childs.
77 virtual bool removeChild(ISceneNode* child); 77 virtual bool removeChild(ISceneNode* child);
78 78
79 private: 79 private:
80 80
81 void deleteTree(); 81 void deleteTree();
82 82
83 core::aabbox3d<f32> Box; 83 core::aabbox3d<f32> Box;
84 84
85 Octree<video::S3DVertex>* StdOctree; 85 Octree<video::S3DVertex>* StdOctree;
86 core::array< Octree<video::S3DVertex>::SMeshChunk > StdMeshes; 86 core::array< Octree<video::S3DVertex>::SMeshChunk > StdMeshes;
87 87
88 Octree<video::S3DVertex2TCoords>* LightMapOctree; 88 Octree<video::S3DVertex2TCoords>* LightMapOctree;
89 core::array< Octree<video::S3DVertex2TCoords>::SMeshChunk > LightMapMeshes; 89 core::array< Octree<video::S3DVertex2TCoords>::SMeshChunk > LightMapMeshes;
90 90
91 Octree<video::S3DVertexTangents>* TangentsOctree; 91 Octree<video::S3DVertexTangents>* TangentsOctree;
92 core::array< Octree<video::S3DVertexTangents>::SMeshChunk > TangentsMeshes; 92 core::array< Octree<video::S3DVertexTangents>::SMeshChunk > TangentsMeshes;
93 93
94 video::E_VERTEX_TYPE VertexType; 94 video::E_VERTEX_TYPE VertexType;
95 core::array< video::SMaterial > Materials; 95 core::array< video::SMaterial > Materials;
96 96
97 core::stringc MeshName; 97 core::stringc MeshName;
98 s32 MinimalPolysPerNode; 98 s32 MinimalPolysPerNode;
99 s32 PassCount; 99 s32 PassCount;
100 100
101 IMesh * Mesh; 101 IMesh * Mesh;
102 IShadowVolumeSceneNode* Shadow; 102 IShadowVolumeSceneNode* Shadow;
103 //! use VBOs for rendering where possible 103 //! use VBOs for rendering where possible
104 bool UseVBOs; 104 bool UseVBOs;
105 //! use visibility information together with VBOs 105 //! use visibility information together with VBOs
106 bool UseVisibilityAndVBOs; 106 bool UseVisibilityAndVBOs;
107 //! use bounding box or frustum for calculate polys 107 //! use bounding box or frustum for calculate polys
108 bool BoxBased; 108 bool BoxBased;
109 }; 109 };
110 110
111} // end namespace scene 111} // end namespace scene
112} // end namespace irr 112} // end namespace irr
113 113
114#endif 114#endif
115 115