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

RenderGeometry provide a class for visualizing Geometry objects. More...

#include <RenderGeometry.hpp>

Inherits Render.

Public Types

typedef rw::core::Ptr< RenderGeometryPtr
 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

 RenderGeometry (rw::geometry::Geometry::Ptr geo)
 Constructs RenderGeometry object. More...
 
 RenderGeometry (rw::core::Ptr< rw::geometry::TriMesh > mesh)
 Constructs RenderGeometry object. More...
 
virtual ~RenderGeometry ()
 Destructor.
 
void setColor (float r, float g, float b)
 Sets color of the object. More...
 
void setGeometry (rw::geometry::Geometry::Ptr geom)
 set a new geometry on this render More...
 
rw::geometry::Geometry::Ptr getGeometry () const
 Get the geometry that is being rendered. 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
 

Protected Member Functions

void render () const
 Do the actual rendering of the triangles.
 
- Protected Member Functions inherited from Render
 Render ()
 Only instances of classes inheriting Render is allowed.
 

Detailed Description

RenderGeometry provide a class for visualizing Geometry objects.

Constructor & Destructor Documentation

◆ RenderGeometry() [1/2]

Constructs RenderGeometry object.

Constructs a RenderGeometry object to visualize the geometry.

Parameters
geo[in] the geometry to draw

◆ RenderGeometry() [2/2]

Constructs RenderGeometry object.

Constructs a RenderGeometry object to visualize the triangle mesh.

Parameters
mesh[in] the triangle mesh to draw

Member Function Documentation

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

◆ getGeometry()

rw::geometry::Geometry::Ptr getGeometry ( ) const
inline

Get the geometry that is being rendered.

Returns
the geometry.

◆ setColor()

void setColor ( float  r,
float  g,
float  b 
)

Sets color of the object.

Parameters
r[in] red color component
g[in] green color component
b[in] blue color component

◆ setGeometry()

void setGeometry ( rw::geometry::Geometry::Ptr  geom)

set a new geometry on this render

Parameters
geom[in] geometry that is to be rendered

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