Ignition Rendering

API Reference

6.3.1
OgreDynamicLines Class Reference

Class for drawing lines that can change. More...

#include <OgreDynamicLines.hh>

Public Member Functions

 OgreDynamicLines (MarkerType _opType=MT_LINE_STRIP)
 Constructor. More...
 
virtual ~OgreDynamicLines ()
 Destructor. 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 (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...
 
ignition::math::Vector3d Point (unsigned int _index) const
 Return the location of an existing point in the point list. More...
 
unsigned int PointCount () const
 Return the total number of points in the point list. More...
 
void SetColor (unsigned int _index, const ignition::math::Color &_color)
 Change the color of an existing point in the point list. More...
 
void SetPoint (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...
 
- Public Member Functions inherited from OgreDynamicRenderable
 OgreDynamicRenderable ()
 Constructor. More...
 
virtual ~OgreDynamicRenderable ()
 Virtual destructor. More...
 
virtual Ogre::Real getBoundingRadius () const
 Implementation of Ogre::SimpleRenderable. More...
 
virtual Ogre::Real getSquaredViewDepth (const Ogre::Camera *_cam) const
 Implementation of Ogre::SimpleRenderable. More...
 
void Init (MarkerType _opType, bool _useIndices=false)
 Initializes the dynamic renderable. More...
 
MarkerType OperationType () const
 Get the render operation type. More...
 
void SetOperationType (MarkerType _opType)
 Set the render operation type. More...
 

Additional Inherited Members

- Protected Member Functions inherited from OgreDynamicRenderable
void PrepareHardwareBuffers (size_t _vertexCount, size_t _indexCount)
 Prepares the hardware buffers for the requested vertex and index counts. More...
 
- Protected Attributes inherited from OgreDynamicRenderable
size_t indexBufferCapacity = 0
 Maximum capacity of the currently allocated index buffer. More...
 
size_t vertexBufferCapacity = 0
 Maximum capacity of the currently allocated vertex buffer. More...
 

Detailed Description

Class for drawing lines that can change.

Constructor & Destructor Documentation

◆ OgreDynamicLines()

OgreDynamicLines ( MarkerType  _opType = MT_LINE_STRIP)
explicit

Constructor.

Parameters
[in]_opTypeThe type of Line

◆ ~OgreDynamicLines()

virtual ~OgreDynamicLines ( )
virtual

Destructor.

Member Function Documentation

◆ AddPoint() [1/2]

void AddPoint ( const ignition::math::Vector3d _pt,
const ignition::math::Color _color = ignition::math::Color::White 
)

Add a point to the point list.

Parameters
[in]_ptignition::math::Vector3d point
[in]_colorignition::math::Color Point color

◆ AddPoint() [2/2]

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.

Parameters
[in]_xX position
[in]_yY position
[in]_zZ position
[in]_colorignition::math::Color Point color

◆ Clear()

void Clear ( )

Remove all points from the point list.

◆ Point()

ignition::math::Vector3d Point ( unsigned int  _index) const

Return the location of an existing point in the point list.

Parameters
[in]_indexNumber of the point to return
Returns
ignition::math::Vector3d value of the point. A vector of [ignition::math::INF_D, ignition::math::INF_D, ignition::math::INF_D] is returned when then the _index is out of bounds. ignition::math::INF_D==std::numeric_limits<double>::infinity()

◆ PointCount()

unsigned int PointCount ( ) const

Return the total number of points in the point list.

Returns
Number of points

◆ SetColor()

void SetColor ( unsigned int  _index,
const ignition::math::Color _color 
)

Change the color of an existing point in the point list.

Parameters
[in]_indexIndex of the point to set
[in]_colorignition::math::Color Pixelcolor color to set the point to

◆ SetPoint()

void SetPoint ( unsigned int  _index,
const ignition::math::Vector3d _value 
)

Change the location of an existing point in the point list.

Parameters
[in]_indexIndex of the point to set
[in]_valueignition::math::Vector3d value to set the point to

◆ Update()

void Update ( )

Call this to update the hardware buffer after making changes.


The documentation for this class was generated from the following file: