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 
00045     Octree * getOctant()
00046     {
00047         return mOctant;
00048     };
00049 
00052     void setOctant( Octree *o )
00053     {
00054         mOctant = o;
00055     };
00056 
00059     bool _isIn( AxisAlignedBox &box );
00060 
00063     virtual void _addToRenderQueue( Camera* cam, RenderQueue * );
00064 
00069     virtual void getRenderOperation( RenderOperation& rend );
00070 
00075     AxisAlignedBox & _getLocalAABB()
00076     {
00077         return mLocalAABB;
00078     };
00079 
00080 
00081 
00082 
00083 protected:
00084 
00091     void _updateBounds( void );
00092 
00094     AxisAlignedBox mLocalAABB;
00095 
00097     Octree *mOctant;
00098 
00100     Real mCorners[ 24 ];
00102     static unsigned long mColors[ 8 ];
00104     static unsigned short mIndexes[ 24 ];
00105 
00106 
00107 };
00108 
00109 }
00110 
00111 
00112 #endif

Copyright © 2002 by The OGRE Team