Go to the documentation of this file.
17 #ifndef GAZEBO_RENDERING_DYNAMICLINES_HH
18 #define GAZEBO_RENDERING_DYNAMICLINES_HH
23 #include <ignition/math/Color.hh>
38 class DynamicLinesPrivate;
54 public:
static std::string GetMovableType();
58 public:
virtual const Ogre::String &getMovableType()
const;
64 public:
void AddPoint(
const ignition::math::Vector3d &_pt,
70 public:
void AddPoint(
const ignition::math::Vector3d &_pt,
71 const ignition::math::Color &_color = ignition::math::Color::White);
79 public:
void AddPoint(
double _x,
double _y,
double _z,
87 public:
void AddPoint(
const double _x,
const double _y,
const double _z,
88 const ignition::math::Color &_color = ignition::math::Color::White);
93 public:
void SetPoint(
const unsigned int _index,
94 const ignition::math::Vector3d &_value);
100 public:
void SetColor(
unsigned int _index,
const common::Color &_color)
107 public:
void SetColor(
const unsigned int _index,
108 const ignition::math::Color &_color);
116 public: ignition::math::Vector3d Point(
const unsigned int _index)
const;
120 public:
unsigned int GetPointCount()
const;
123 public:
void Clear();
126 public:
void Update();
130 private:
virtual void CreateVertexDeclaration();
134 private:
virtual void FillHardwareBuffers();
137 private: std::vector<ignition::math::Vector3d> points;
143 private: std::unique_ptr<DynamicLinesPrivate> dataPtr;
Forward declarations for the common classes.
Definition: Animation.hh:26
void SetPoint(const unsigned int _index, const ignition::math::Vector3d &_value)
Change the location of an existing point in the point list.
Abstract base class providing mechanisms for dynamically growing hardware buffers.
Definition: DynamicRenderable.hh:35
Class for drawing lines that can change.
Definition: DynamicLines.hh:42
DynamicLines(RenderOpType _opType=RENDERING_LINE_STRIP)
Constructor.
A strip of connected lines, 1 vertex per line plus 1 start vertex.
Definition: RenderTypes.hh:226
RenderOpType
Type of render operation for a drawable.
Definition: RenderTypes.hh:216
virtual ~DynamicLines()
Destructor.
void Clear()
Remove all points from the point list.
unsigned int GetPointCount() const
Return the total number of points in the point list.
void Update()
Call this to update the hardware buffer after making changes.
void SetColor(unsigned int _index, const common::Color &_color) GAZEBO_DEPRECATED(9.0)
Change the color of an existing point in the point list.
virtual const Ogre::String & getMovableType() const
Overridden function from Ogre's base class.
ignition::math::Vector3d Point(const unsigned int _index) const
Return the location of an existing point in the point list.
Defines a color.
Definition: Color.hh:36
void AddPoint(const ignition::math::Vector3d &_pt, const common::Color &_color) GAZEBO_DEPRECATED(9.0)
Add a point to the point list.
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:328
static std::string GetMovableType()
Get type of movable.