Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OgreOctreeNode.h

Go to the documentation of this file.
00001 /***************************************************************************
00002 octreenode.h  -  description
00003 -------------------
00004 begin                : Fri Sep 27 2002
00005 copyright            : (C) 2002 by Jon Anderson
00006 email                : janders@users.sf.net
00007 ***************************************************************************/
00008 
00009 /***************************************************************************
00010 *                                                                         *
00011 *   This program is free software; you can redistribute it and/or modify  *
00012 *   it under the terms of the GNU Lesser General Public License as        *
00013 *   published by the Free Software Foundation; either version 2 of the    * 
00014 *   License, or (at your option) any later version.                       *
00015 *                                                                         *
00016 ***************************************************************************/
00017 
00018 #ifndef OCTREENODE_H
00019 #define OCTREENODE_H
00020 
00021 #include <OgreSceneNode.h>
00022 
00023 #include <OgreOctreeSceneManager.h>
00024 
00025 namespace Ogre
00026 {
00027 
00033 class OctreeNode : public SceneNode
00034 {
00035 public:
00037     OctreeNode( SceneManager* creator );
00039     OctreeNode( SceneManager* creator, const String& name );
00041     ~OctreeNode();
00042 
00044     Node * removeChild( unsigned short index );
00045     
00047     Node * removeChild( const String & name );
00048 
00051     Octree * getOctant()
00052     {
00053         return mOctant;
00054     };
00055 
00058     void setOctant( Octree *o )
00059     {
00060         mOctant = o;
00061     };
00062 
00065     bool _isIn( AxisAlignedBox &box );
00066 
00069     virtual void _addToRenderQueue( Camera* cam, RenderQueue * q, bool onlyShadowCasters );
00070 
00075     virtual void getRenderOperation( RenderOperation& op );
00076 
00081     AxisAlignedBox & _getLocalAABB()
00082     {
00083         return mLocalAABB;
00084     };
00085 
00086 
00087 
00088 
00089 protected:
00090 
00097     void _updateBounds( void );
00098 
00099     void _removeNodeAndChildren( );
00100 
00102     AxisAlignedBox mLocalAABB;
00103 
00105     Octree *mOctant;
00106 
00108     Real mCorners[ 24 ];
00110     static unsigned long mColors[ 8 ];
00112     static unsigned short mIndexes[ 24 ];
00113 
00114 
00115 };
00116 
00117 }
00118 
00119 
00120 #endif

Copyright © 2002-2003 by The OGRE Team
Last modified Fri May 14 23:22:29 2004