Class
List
Heirarchy
Modules
Common
Events
Math
Messages
Physics
Rendering
Sensors
Transport
Links
Gazebo Website
Wiki
Tutorials
Download
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
gazebo
rendering
DynamicRenderable.hh
Go to the documentation of this file.
1
/*
2
* Copyright 2011 Nate Koenig
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
*/
17
#ifndef _DYNAMICRENDERABLE_HH_
18
#define _DYNAMICRENDERABLE_HH_
19
20
#include "
rendering/ogre_gazebo.h
"
21
#include "
rendering/RenderTypes.hh
"
22
23
namespace
gazebo
24
{
25
namespace
rendering
26
{
29
33
class
DynamicRenderable
:
public
Ogre::SimpleRenderable
34
{
36
public
:
DynamicRenderable
();
37
39
public
:
virtual
~DynamicRenderable
();
40
48
public
:
void
Init
(
RenderOpType
_opType,
bool
_useIndices =
false
);
49
52
public
:
void
SetOperationType
(
RenderOpType
_opType);
53
56
public
:
RenderOpType
GetOperationType
()
const
;
57
60
public
:
virtual
Ogre::Real
getBoundingRadius
()
const
;
61
66
public
:
virtual
Ogre::Real
getSquaredViewDepth
(
67
const
Ogre::Camera *_cam)
const
;
68
72
protected
:
virtual
void
CreateVertexDeclaration
() = 0;
73
87
protected
:
void
PrepareHardwareBuffers
(
size_t
_vertexCount,
88
size_t
_indexCount);
89
96
protected
:
virtual
void
FillHardwareBuffers
() = 0;
97
99
protected
:
size_t
vertexBufferCapacity
;
100
102
protected
:
size_t
indexBufferCapacity
;
103
};
105
}
106
}
107
#endif