![]() |
RobWorkProject
25.2.11-
|
Render drawing a collection of lines. More...
#include <RenderLines.hpp>
Inherits Render.
Public Types | |
typedef rw::core::Ptr< RenderLines > | Ptr |
smart pointer type to this class | |
![]() | |
typedef rw::core::Ptr< Render > | Ptr |
smart pointer type to this class | |
typedef DrawableNode::DrawType | DrawType |
when calling render on the draw mode or type can be specified. See DrawableNode::DrawType | |
Public Member Functions | |
RenderLines () | |
Constructs RenderLine with no lines. | |
RenderLines (const std::vector< rw::geometry::Line > &lines) | |
Construct RenderLine adding the lines specified. More... | |
virtual | ~RenderLines () |
Descructor. | |
void | addLine (const rw::math::Vector3D<> &v1, const rw::math::Vector3D<> &v2) |
Adds a single line to the drawable. More... | |
void | addLines (const std::vector< rw::geometry::Line > &lines) |
Adds a collection of lines. More... | |
void | setColor (float r, float g, float b, float alpha) |
Sets the color of the lines. More... | |
void | setThickness (float thickness) |
Sets thickness of the line. More... | |
void | clear () |
Clears all lines. More... | |
void | draw (const rw::graphics::DrawableNode::RenderInfo &info, rw::graphics::DrawableNode::DrawType type, double alpha) const |
![]() | |
virtual | ~Render () |
destructor | |
Additional Inherited Members | |
![]() | |
Render () | |
Only instances of classes inheriting Render is allowed. | |
Render drawing a collection of lines.
RenderLines | ( | const std::vector< rw::geometry::Line > & | lines | ) |
Construct RenderLine adding the lines specified.
lines | [in] Lines to draw |
void addLine | ( | const rw::math::Vector3D<> & | v1, |
const rw::math::Vector3D<> & | v2 | ||
) |
Adds a single line to the drawable.
v1 | [in] Start point for line |
v2 | [in] End point for line |
void addLines | ( | const std::vector< rw::geometry::Line > & | lines | ) |
Adds a collection of lines.
lines | [in] List of lines |
void clear | ( | ) |
Clears all lines.
When clearing the lines a new display list without lines will be generated.
|
virtual |
info | [in] state and rendering specific info |
type | [in] the drawtype which is being used |
alpha | [in] the alpha value to render with |
Implements Render.
void setColor | ( | float | r, |
float | g, | ||
float | b, | ||
float | alpha | ||
) |
Sets the color of the lines.
The influence of the alpha value depends on how opengl is configured.
r | [in] red [0;1] |
g | [in] green [0;1] |
b | [in] blue [0;1] |
alpha | [in] alpha [0;1] |
void setThickness | ( | float | thickness | ) |
Sets thickness of the line.
The thickness is forwarded to glLineWidth. Default 1.0.
thickness | [in] Thickness of the lines |