##

DynamicRenderable.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef _DYNAMICRENDERABLE_HH_
#define _DYNAMICRENDERABLE_HH_
#include <string>
#include "gazebo/rendering/ogre_gazebo.h"
#include "gazebo/rendering/RenderTypes.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace rendering
{
class GZ_RENDERING_VISIBLE DynamicRenderable : public Ogre::SimpleRenderable
{
public: DynamicRenderable();
public: virtual ~DynamicRenderable();
public: void Init(RenderOpType _opType, bool _useIndices = false);
public: void SetOperationType(RenderOpType _opType);
public: RenderOpType GetOperationType() const;
public: virtual Ogre::Real getBoundingRadius() const;
public: virtual Ogre::Real getSquaredViewDepth(
const Ogre::Camera *_cam) const;
public: std::string GetMovableType() const;
protected: virtual void CreateVertexDeclaration() = 0;
protected: void PrepareHardwareBuffers(size_t _vertexCount,
size_t _indexCount);
protected: virtual void FillHardwareBuffers() = 0;
protected: size_t vertexBufferCapacity;
protected: size_t indexBufferCapacity;
};
}
}
#endif
gazebo::rendering::DynamicRenderable::FillHardwareBuffers
virtual void FillHardwareBuffers()=0
Fills the hardware vertex and index buffers with data.
gazebo::rendering::DynamicRenderable::indexBufferCapacity
size_t indexBufferCapacity
Maximum capacity of the currently allocated index buffer.
Definition: DynamicRenderable.hh:108
gazebo::rendering::DynamicRenderable::GetOperationType
RenderOpType GetOperationType() const
Get the render operation type.
gazebo::rendering::DynamicRenderable::PrepareHardwareBuffers
void PrepareHardwareBuffers(size_t _vertexCount, size_t _indexCount)
Prepares the hardware buffers for the requested vertex and index counts.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::rendering::DynamicRenderable::CreateVertexDeclaration
virtual void CreateVertexDeclaration()=0
Creates the vertex declaration.
gazebo::rendering::DynamicRenderable::SetOperationType
void SetOperationType(RenderOpType _opType)
Set the render operation type.
gazebo::rendering::DynamicRenderable
Abstract base class providing mechanisms for dynamically growing hardware buffers.
Definition: DynamicRenderable.hh:35
system.hh
gazebo::rendering::DynamicRenderable::getBoundingRadius
virtual Ogre::Real getBoundingRadius() const
Implementation of Ogre::SimpleRenderable.
gazebo::rendering::DynamicRenderable::Init
void Init(RenderOpType _opType, bool _useIndices=false)
Initializes the dynamic renderable.
gazebo::rendering::DynamicRenderable::DynamicRenderable
DynamicRenderable()
Constructor.
gazebo::rendering::RenderOpType
RenderOpType
Type of render operation for a drawable.
Definition: RenderTypes.hh:216
RenderTypes.hh
rendering
rendering
Definition: RenderEngine.hh:31
gazebo::rendering::DynamicRenderable::~DynamicRenderable
virtual ~DynamicRenderable()
Virtual destructor.
ogre_gazebo.h
gazebo::msgs::Init
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
gazebo::rendering::DynamicRenderable::getSquaredViewDepth
virtual Ogre::Real getSquaredViewDepth(const Ogre::Camera *_cam) const
Implementation of Ogre::SimpleRenderable.
gazebo::rendering::DynamicRenderable::GetMovableType
std::string GetMovableType() const
Get type of movable.
gazebo::rendering::DynamicRenderable::vertexBufferCapacity
size_t vertexBufferCapacity
Maximum capacity of the currently allocated vertex buffer.
Definition: DynamicRenderable.hh:105