Class for drawing lines that can change. More...
#include <rendering/rendering.hh>
Inherits DynamicRenderable.
Public Member Functions | |
DynamicLines (RenderOpType _opType=RENDERING_LINE_STRIP) | |
Constructor. More... | |
virtual | ~DynamicLines () |
Destructor. More... | |
void | AddPoint (const ignition::math::Vector3d &_pt, const common::Color &_color) GAZEBO_DEPRECATED(9.0) |
Add a point to the point list. More... | |
void | AddPoint (const ignition::math::Vector3d &_pt, const ignition::math::Color &_color=ignition::math::Color::White) |
Add a point to the point list. More... | |
void | AddPoint (double _x, double _y, double _z, const common::Color &_color) GAZEBO_DEPRECATED(9.0) |
Add a point to the point list. More... | |
void | AddPoint (const double _x, const double _y, const double _z, const ignition::math::Color &_color=ignition::math::Color::White) |
Add a point to the point list. More... | |
void | Clear () |
Remove all points from the point list. More... | |
virtual Ogre::Real | getBoundingRadius () const |
Implementation of Ogre::SimpleRenderable. More... | |
virtual const Ogre::String & | getMovableType () const |
Overridden function from Ogre's base class. More... | |
std::string | GetMovableType () const |
Get type of movable. More... | |
RenderOpType | GetOperationType () const |
Get the render operation type. More... | |
unsigned int | GetPointCount () const |
Return the total number of points in the point list. More... | |
virtual Ogre::Real | getSquaredViewDepth (const Ogre::Camera *_cam) const |
Implementation of Ogre::SimpleRenderable. More... | |
void | Init (RenderOpType _opType, bool _useIndices=false) |
Initializes the dynamic renderable. More... | |
ignition::math::Vector3d | Point (const unsigned int _index) const |
Return the location of an existing point in the point list. More... | |
void | SetColor (unsigned int _index, const common::Color &_color) GAZEBO_DEPRECATED(9.0) |
Change the color of an existing point in the point list. More... | |
void | SetColor (const unsigned int _index, const ignition::math::Color &_color) |
Change the color of an existing point in the point list. More... | |
void | SetOperationType (RenderOpType _opType) |
Set the render operation type. More... | |
void | SetPoint (const unsigned int _index, const ignition::math::Vector3d &_value) |
Change the location of an existing point in the point list. More... | |
void | Update () |
Call this to update the hardware buffer after making changes. More... | |
Static Public Member Functions | |
static std::string | GetMovableType () |
Get type of movable. More... | |
Protected Member Functions | |
void | PrepareHardwareBuffers (size_t _vertexCount, size_t _indexCount) |
Prepares the hardware buffers for the requested vertex and index counts. More... | |
Protected Attributes | |
size_t | indexBufferCapacity |
Maximum capacity of the currently allocated index buffer. More... | |
size_t | vertexBufferCapacity |
Maximum capacity of the currently allocated vertex buffer. More... | |
Class for drawing lines that can change.
|
explicit |
Constructor.
[in] | _opType | The type of Line |
|
virtual |
Destructor.
void AddPoint | ( | const ignition::math::Vector3d & | _pt, |
const common::Color & | _color | ||
) |
Add a point to the point list.
[in] | _pt | ignition::math::Vector3d point |
[in] | _color | common::Color Point color |
void AddPoint | ( | const ignition::math::Vector3d & | _pt, |
const ignition::math::Color & | _color = ignition::math::Color::White |
||
) |
Add a point to the point list.
[in] | _pt | ignition::math::Vector3d point |
[in] | _color | ignition::math::Color Point color |
void AddPoint | ( | double | _x, |
double | _y, | ||
double | _z, | ||
const common::Color & | _color | ||
) |
Add a point to the point list.
[in] | _x | X position |
[in] | _y | Y position |
[in] | _z | Z position |
[in] | _color | common::Color Point color |
void AddPoint | ( | const double | _x, |
const double | _y, | ||
const double | _z, | ||
const ignition::math::Color & | _color = ignition::math::Color::White |
||
) |
Add a point to the point list.
[in] | _x | X position |
[in] | _y | Y position |
[in] | _z | Z position |
[in] | _color | ignition::math::Color Point color |
void Clear | ( | ) |
Remove all points from the point list.
|
virtualinherited |
Implementation of Ogre::SimpleRenderable.
|
static |
Get type of movable.
|
virtual |
Overridden function from Ogre's base class.
|
inherited |
Get type of movable.
|
inherited |
Get the render operation type.
unsigned int GetPointCount | ( | ) | const |
Return the total number of points in the point list.
|
virtualinherited |
|
inherited |
Initializes the dynamic renderable.
[in] | _opType | The type of render operation to perform. |
[in] | _useIndices | Specifies whether to use indices to determine the vertices to use as input. |
ignition::math::Vector3d Point | ( | const unsigned int | _index | ) | const |
Return the location of an existing point in the point list.
[in] | _index | Number of the point to return |
|
protectedinherited |
Prepares the hardware buffers for the requested vertex and index counts.
[in] | _vertexCount | The number of vertices the buffer must hold. |
[in] | _indexCount | The number of indices the buffer must hold. This parameter is ignored if not using indices. |
void SetColor | ( | unsigned int | _index, |
const common::Color & | _color | ||
) |
Change the color of an existing point in the point list.
[in] | _index | Index of the point to set |
[in] | _color | common::Color Pixelcolor color to set the point to |
void SetColor | ( | const unsigned int | _index, |
const ignition::math::Color & | _color | ||
) |
Change the color of an existing point in the point list.
[in] | _index | Index of the point to set |
[in] | _color | ignition::math::Color Pixelcolor color to set the point to |
|
inherited |
Set the render operation type.
[in] | _opType | The type of render operation to perform. |
void SetPoint | ( | const unsigned int | _index, |
const ignition::math::Vector3d & | _value | ||
) |
Change the location of an existing point in the point list.
[in] | _index | Index of the point to set |
[in] | _value | ignition::math::Vector3d value to set the point to |
void Update | ( | ) |
Call this to update the hardware buffer after making changes.
|
protectedinherited |
Maximum capacity of the currently allocated index buffer.
|
protectedinherited |
Maximum capacity of the currently allocated vertex buffer.