OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreOctreeNode.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2014 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 /***************************************************************************
29 octreenode.h - description
30 -------------------
31 begin : Fri Sep 27 2002
32 copyright : (C) 2002 by Jon Anderson
33 email : janders@users.sf.net
34 
35 ***************************************************************************/
36 
37 #ifndef OCTREENODE_H
38 #define OCTREENODE_H
39 
40 #include "OgreSceneNode.h"
41 
43 #include "OgreOctree.h"
44 
45 namespace Ogre
46 {
47 
54 {
55 public:
57  OctreeNode( SceneManager* creator );
59  OctreeNode( SceneManager* creator, const String& name );
61  ~OctreeNode();
62 
64  Node * removeChild( unsigned short index );
65 
67  Node * removeChild( const String & name );
68 
70  Node * removeChild( Node* child);
71 
73  void removeAllChildren(void);
74 
78  {
79  return mOctant;
80  };
81 
84  void setOctant( Octree *o )
85  {
86  mOctant = o;
87  };
88 
91  bool _isIn( AxisAlignedBox &box );
92 
95  virtual void _addToRenderQueue( Camera* cam, RenderQueue * q, bool onlyShadowCasters,
96  VisibleObjectsBoundsInfo* visibleBounds);
97 
102  virtual void getRenderOperation( RenderOperation& op );
103 
109  {
110  return mLocalAABB;
111  };
112 
113 
114 
115 
116 protected:
117 
124  void _updateBounds( void );
125 
126  void _removeNodeAndChildren( );
127 
130 
133 
135  Real mCorners[ 24 ];
137  static unsigned long mColors[ 8 ];
139  static unsigned short mIndexes[ 24 ];
140 
141 
142 };
143 
144 }
145 
146 
147 #endif
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:82
float Real
Software floating point type.
Octree * mOctant
Octree this node is attached to.
Manages the organisation and rendering of a 'scene' i.e.
A 3D box aligned with the x/y/z axes.
Class representing a node in the scene graph.
Definition: OgreSceneNode.h:53
Octree * getOctant()
Returns the Octree in which this OctreeNode resides.
#define _OgreOctreePluginExport
Octree datastructure for managing scene nodes.
Definition: OgreOctree.h:57
void setOctant(Octree *o)
Sets the Octree in which this OctreeNode resides.
AxisAlignedBox mLocalAABB
Local bounding box.
'New' rendering operation using vertex buffers.
Class to manage the scene object rendering queue.
AxisAlignedBox & _getLocalAABB()
Returns the local bounding box of this OctreeNode.
_StringBase String
Definition: OgreCommon.h:53
Specialized SceneNode that is customized for working within an Octree.
Class representing a general-purpose node an articulated scene graph.
Definition: OgreNode.h:58