Helios++
Helios software for LiDAR simulations
|
Visual Helios Dynamic Canvas is a class which provides the basis layer to deal with dynamic objects rendering in a general purpose fashion. More...
#include <VHDynCanvas.h>
Public Member Functions | |
VHDynCanvas () | |
Default constructor for the visual Helios dynamic canvas. More... | |
VHDynCanvas (string const title) | |
Constructor for the visual Helios dynamic canvas which allows for title specification. More... | |
virtual bool | isNeedingUpdate () const |
Check whether the dynamic canvas needs an update no matter what (true) or not (false) More... | |
virtual void | setNeedsUpdate (bool const needsUpdate) |
Specify if the dynamic canvas needs an update no matter what (true) or not (false) More... | |
![]() | |
VHCanvas () | |
Default constructor for the visual helios canvas. | |
VHCanvas (string const title) | |
Constructor for the visual helios canvas which allows for title specification. More... | |
virtual void | show () |
Make the visualization effective. | |
int | getTimeBetweenUpdates () const |
Obtain milliseconds between canvas updates. More... | |
void | setTimeBetweenUpdates (int const timeBetweenUpdates) |
Set the milliseconds between canvas updates. More... | |
bool | isForceRedraw () const |
Check if force redraw is enabled or not. More... | |
void | setForceRedraw (bool const forceRedraw) |
Enable or disable force redraw. More... | |
string const & | getTitle () const |
Obtain the visual helios canvas title. More... | |
Protected Member Functions | |
void | postUpdate () override |
Defines the default post update behavior for dynamic canvas and derived classes. More... | |
![]() | |
virtual void | configure () |
Configure method where visualizer configuration must be implemented. | |
virtual void | start () |
Start method which initializes the visualization. | |
virtual void | update () |
Update method which handles graphics updating over time. | |
virtual void | onStop () |
Method to handle the behavior of the canvas after visualization has finished. | |
Protected Attributes | |
bool | needsUpdate = false |
Control whether an update is needed even when dynamic objects themselves have not been updated (true) or not (false) | |
![]() | |
string const | title |
The title of the visual Helios canvas. | |
PCLVisualizer::Ptr | viewer |
The PCL visualizer which is used to render graphics. | |
int | timeBetweenUpdates |
How many milliseconds must elapsed between canvas updates. | |
bool | forceRedraw |
Force redraw even when it is not required if true. Try to avoid unnecessary redraws if false. | |
Visual Helios Dynamic Canvas is a class which provides the basis layer to deal with dynamic objects rendering in a general purpose fashion.
|
inline |
Default constructor for the visual Helios dynamic canvas.
|
inline |
Constructor for the visual Helios dynamic canvas which allows for title specification.
title | Title for the visualizer |
|
inlinevirtual |
Check whether the dynamic canvas needs an update no matter what (true) or not (false)
|
overrideprotectedvirtual |
Defines the default post update behavior for dynamic canvas and derived classes.
The dynamic canvas uses postUpdate method to disable the need for updates from canvas side by default after update has been called. It is expected that if updates are needed, they are fully computed after one call of update method. This default behavior has been implemented because it feels quite intuitive to avoid forcing full updates at each step. Otherwise, efficient implementations will be impaired by default because selective update of rendered objects will be compromised.
In case the default behavior should be changed to the opposite, it could be easily done by overriding the postUpdate method and adding following peace of code inside:
Reimplemented from visualhelios::VHCanvas.
|
inlinevirtual |
Specify if the dynamic canvas needs an update no matter what (true) or not (false)
needsUpdate | True to specify the dynamic canvas needs an update, false to specify it does not |