RobWorkProject  24.6.21-
Public Member Functions | List of all members
RenderGhost Class Reference

This render implementation will render a set of previous configurations/states (ghosts) of a set of specific frames. More...

#include <RenderGhost.hpp>

Inherits Render.

Public Member Functions

 RenderGhost (rw::core::Ptr< rw::kinematics::Frame > frame, rw::core::Ptr< rw::graphics::WorkCellScene > drawer, size_t N)
 constructor - for rendering a single frame More...
 
 RenderGhost (std::list< rw::kinematics::Frame * > frames, rw::core::Ptr< rw::graphics::WorkCellScene > drawer, size_t N)
 constructor - for rendering multiple frames More...
 
virtual ~RenderGhost ()
 destructor
 
void addState (const rw::kinematics::State &state)
 add new state that is to be rendered More...
 
void clear ()
 clear all states
 
void setMaxBufferSize (size_t size)
 sets the max number of states that is 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
 

Additional Inherited Members

- 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
 
- Protected Member Functions inherited from Render
 Render ()
 Only instances of classes inheriting Render is allowed.
 

Detailed Description

This render implementation will render a set of previous configurations/states (ghosts) of a set of specific frames.

A fixed size N circular or ring buffer of states is maintained such that the last N added states will be rendered.

Constructor & Destructor Documentation

◆ RenderGhost() [1/2]

constructor - for rendering a single frame

Parameters
frame[in] frame that is to be rerendered
drawer[in] the workcell drawer
N[in] max nr of states that is to be rendered

◆ RenderGhost() [2/2]

RenderGhost ( std::list< rw::kinematics::Frame * >  frames,
rw::core::Ptr< rw::graphics::WorkCellScene drawer,
size_t  N 
)

constructor - for rendering multiple frames

Parameters
frames[in] all frames that are to be rendered
drawer[in] the workcell drawer
N[in] max nr of states that is to be rendered

Member Function Documentation

◆ addState()

void addState ( const rw::kinematics::State state)

add new state that is to be rendered

Parameters
state[in] state that is to be rendered

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

◆ setMaxBufferSize()

void setMaxBufferSize ( size_t  size)

sets the max number of states that is rendered

Parameters
size[in] max number of states to render
Note
be carefull setting this too high, since rendering typically is performance wise quite expensive.

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