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 { 00016 public: OgreDynamicRenderable(); 00017 00019 public: virtual ~OgreDynamicRenderable(); 00020 00028 public: void Init(Ogre::RenderOperation::OperationType operationType, bool useIndices); 00029 00031 public: void SetOperationType(Ogre::RenderOperation::OperationType opType); 00032 00034 public: Ogre::RenderOperation::OperationType GetOperationType() const; 00035 00037 public: virtual Ogre::Real getBoundingRadius(void) const; 00038 00040 public: virtual Ogre::Real getSquaredViewDepth(const Ogre::Camera* cam) const; 00041 00045 protected: virtual void CreateVertexDeclaration() = 0; 00046 00060 protected: void PrepareHardwareBuffers(size_t vertexCount, size_t indexCount); 00061 00068 protected: virtual void FillHardwareBuffers() = 0; 00069 00071 protected: size_t vertexBufferCapacity; 00072 00074 protected: size_t indexBufferCapacity; 00075 00076 }; 00077 00079 } 00080 #endif