Class for drawing lines that can change. More...
#include <rendering/rendering.hh>
Public Member Functions | |
DynamicLines (RenderOpType _opType=RENDERING_LINE_STRIP) | |
Constructor. | |
virtual | ~DynamicLines () |
Destructor. | |
void | AddPoint (const math::Vector3 &_pt) |
Add a point to the point list. | |
void | AddPoint (double _x, double _y, double _z) |
Add a point to the point list. | |
void | Clear () |
Remove all points from the point list. | |
virtual const Ogre::String & | getMovableType () const |
Overridden function from Ogre's base class. | |
const math::Vector3 & | GetPoint (unsigned int _index) const |
Return the location of an existing point in the point list. | |
unsigned int | GetPointCount () const |
Return the total number of points in the point list. | |
void | SetPoint (unsigned int _index, const math::Vector3 &_value) |
Change the location of an existing point in the point list. | |
void | Update () |
Call this to update the hardware buffer after making changes. | |
Public Member Functions inherited from gazebo::rendering::DynamicRenderable | |
DynamicRenderable () | |
Constructor. | |
virtual | ~DynamicRenderable () |
Virtual destructor. | |
virtual Ogre::Real | getBoundingRadius () const |
Implementation of Ogre::SimpleRenderable. | |
RenderOpType | GetOperationType () const |
Get the render operation type. | |
virtual Ogre::Real | getSquaredViewDepth (const Ogre::Camera *_cam) const |
Implementation of Ogre::SimpleRenderable. | |
void | Init (RenderOpType _opType, bool _useIndices=false) |
Initializes the dynamic renderable. | |
void | SetOperationType (RenderOpType _opType) |
Set the render operation type. | |
Static Public Member Functions | |
static std::string | GetMovableType () |
Get type of movable. | |
Protected Member Functions | |
virtual void | CreateVertexDeclaration () |
Implementation DynamicRenderable, creates a simple vertex-only decl. | |
virtual void | FillHardwareBuffers () |
Implementation DynamicRenderable, pushes point list out to hardware memory. | |
Protected Member Functions inherited from gazebo::rendering::DynamicRenderable | |
void | PrepareHardwareBuffers (size_t _vertexCount, size_t _indexCount) |
Prepares the hardware buffers for the requested vertex and index counts. | |
Additional Inherited Members | |
Protected Attributes inherited from gazebo::rendering::DynamicRenderable | |
size_t | indexBufferCapacity |
Maximum capacity of the currently allocated index buffer. | |
size_t | vertexBufferCapacity |
Maximum capacity of the currently allocated vertex buffer. | |
Class for drawing lines that can change.
gazebo::rendering::DynamicLines::DynamicLines | ( | RenderOpType | _opType = RENDERING_LINE_STRIP | ) |
Constructor.
[in] | _opType | The type of Line |
|
virtual |
Destructor.
void gazebo::rendering::DynamicLines::AddPoint | ( | const math::Vector3 & | _pt | ) |
Add a point to the point list.
[in] | pt | math::Vector3 point |
void gazebo::rendering::DynamicLines::AddPoint | ( | double | _x, |
double | _y, | ||
double | _z | ||
) |
Add a point to the point list.
[in] | _x | X position. |
[in] | _y | Y position. |
[in] | _z | Z position. |
void gazebo::rendering::DynamicLines::Clear | ( | ) |
Remove all points from the point list.
|
protectedvirtual |
Implementation DynamicRenderable, creates a simple vertex-only decl.
Implements gazebo::rendering::DynamicRenderable.
|
protectedvirtual |
Implementation DynamicRenderable, pushes point list out to hardware memory.
Implements gazebo::rendering::DynamicRenderable.
|
static |
Get type of movable.
|
virtual |
Overridden function from Ogre's base class.
const math::Vector3& gazebo::rendering::DynamicLines::GetPoint | ( | unsigned int | _index | ) | const |
Return the location of an existing point in the point list.
[in] | _index | Number of the point to return |
unsigned int gazebo::rendering::DynamicLines::GetPointCount | ( | ) | const |
Return the total number of points in the point list.
void gazebo::rendering::DynamicLines::SetPoint | ( | unsigned int | _index, |
const math::Vector3 & | _value | ||
) |
Change the location of an existing point in the point list.
[in] | _index | Index of the point to set |
[in] | _value | math::Vector3 value to set the point to |
void gazebo::rendering::DynamicLines::Update | ( | ) |
Call this to update the hardware buffer after making changes.