RobWorkProject  24.5.15-
Public Types | Public Member Functions | List of all members
RenderLines Class Reference

Render drawing a collection of lines. More...

#include <RenderLines.hpp>

Inherits Render.

Public Types

typedef rw::core::Ptr< RenderLinesPtr
 smart pointer type to this class
 
- Public Types inherited from Render
typedef rw::core::Ptr< RenderPtr
 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
 
- Public Member Functions inherited from Render
virtual ~Render ()
 destructor
 

Additional Inherited Members

- Protected Member Functions inherited from Render
 Render ()
 Only instances of classes inheriting Render is allowed.
 

Detailed Description

Render drawing a collection of lines.

Constructor & Destructor Documentation

◆ RenderLines()

RenderLines ( const std::vector< rw::geometry::Line > &  lines)

Construct RenderLine adding the lines specified.

Parameters
lines[in] Lines to draw

Member Function Documentation

◆ addLine()

void addLine ( const rw::math::Vector3D<> &  v1,
const rw::math::Vector3D<> &  v2 
)

Adds a single line to the drawable.

Parameters
v1[in] Start point for line
v2[in] End point for line

◆ addLines()

void addLines ( const std::vector< rw::geometry::Line > &  lines)

Adds a collection of lines.

Parameters
lines[in] List of lines

◆ clear()

void clear ( )

Clears all lines.

When clearing the lines a new display list without lines will be generated.

◆ draw()

void draw ( const rw::graphics::DrawableNode::RenderInfo info,
rw::graphics::DrawableNode::DrawType  type,
double  alpha 
) const
virtual

Parameters
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.

◆ setColor()

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.

Parameters
r[in] red [0;1]
g[in] green [0;1]
b[in] blue [0;1]
alpha[in] alpha [0;1]

◆ setThickness()

void setThickness ( float  thickness)

Sets thickness of the line.

The thickness is forwarded to glLineWidth. Default 1.0.

Parameters
thickness[in] Thickness of the lines

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