Gazebo

OgreDynamicRenderable.hh

00001 #ifndef OGREDYNAMICRENDERABLE_HH
00002 #define OGREDYNAMICRENDERABLE_HH
00003 
00004 #include <OgreSimpleRenderable.h>
00005 
00006 namespace gazebo
00007 {
00008 
00011 
00013 class OgreDynamicRenderable : public Ogre::SimpleRenderable
00014 {
00015   public: enum OperationType 
00016   {
00018     OT_POINT_LIST = 0,//Ogre::RenderOperation::OT_POINT_LIST,
00019 
00021     OT_LINE_LIST = 1,//Ogre::RenderOperation::OT_LINE_LIST,
00022 
00024     OT_LINE_STRIP = 2,//Ogre::RenderOperation::OT_LINE_STRIP,
00025 
00027     OT_TRIANGLE_LIST = 3,//Ogre::RenderOperation::OT_TRIANGLE_LIST,
00028 
00030     OT_TRIANGLE_STRIP = 4,//Ogre::RenderOperation::OT_TRIANGLE_STRIP,
00031 
00033     OT_TRIANGLE_FAN = 5,//Ogre::RenderOperation::OT_TRIANGLE_FAN 
00034   };
00035 
00037   public: OgreDynamicRenderable();
00038 
00040   public: virtual ~OgreDynamicRenderable();
00041 
00049   public: void Init(OperationType operationType, bool useIndices);
00050 
00052   public: void SetOperationType(OperationType opType);
00053 
00055   public: OgreDynamicRenderable::OperationType GetOperationType() const;
00056 
00058   public: virtual Ogre::Real getBoundingRadius(void) const;
00059 
00061   public: virtual Ogre::Real getSquaredViewDepth(const Ogre::Camera* cam) const;
00062 
00066   protected: virtual void CreateVertexDeclaration() = 0;
00067 
00081   protected: void PrepareHardwareBuffers(size_t vertexCount, size_t indexCount);
00082 
00089   protected: virtual void FillHardwareBuffers() = 0;
00090 
00092   protected: size_t vertexBufferCapacity;
00093 
00095   protected: size_t indexBufferCapacity;
00096 
00097 };
00098 
00100 }
00101 #endif

Last updated Aug 04 2007