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

OgreOctreeCamera.h

Go to the documentation of this file.
00001 /***************************************************************************
00002 octreecamera.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 OCTREECAMERA_H
00019 #define OCTREECAMERA_H
00020 
00021 #include <OgreCamera.h>
00022 #include <OgreHardwareBufferManager.h>
00023 #include <OgreSimpleRenderable.h>
00024 
00029 namespace Ogre
00030 {
00031 
00032 class Octree;
00033 
00034 
00043 class OctreeCamera : public Camera, public Renderable
00044 {
00045 public:
00046 
00048     enum Visibility
00049     {
00050         NONE,
00051         PARTIAL,
00052         FULL
00053     };
00054 
00055     /* Standard Constructor */
00056     OctreeCamera( const String& name, SceneManager* sm );
00057     /* Standard destructor */
00058     ~OctreeCamera();
00059 
00062     OctreeCamera::Visibility getVisibility( const AxisAlignedBox &bound );
00063 
00066     virtual void getRenderOperation(RenderOperation& op);
00067 
00068     virtual Material* getMaterial(void) const;
00069 
00070     virtual void getWorldTransforms(Matrix4* xform) const;
00071     virtual const Quaternion& getWorldOrientation(void) const;
00072     virtual const Vector3& getWorldPosition(void) const;
00073 
00075     const LightList& getLights(void) const;
00076 
00077     Real getSquaredViewDepth(const Camera* cam) const;
00078 
00079 protected:
00082     void _getCorner( Real *r, FrustumPlane p1, FrustumPlane p2, FrustumPlane p3 );
00083 
00084     Real mCorners[ 24 ];
00086     static unsigned short mIndexes[ 24 ];
00088     static unsigned long mColors[ 8 ];
00089 
00090     Material* mMaterial;
00091 
00092 private:
00093     VertexData* mVertexData;
00094     IndexData* mIndexData;
00095 };
00096 
00097 }
00098 
00099 #endif

Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:10:19 2004