Helios++
Helios software for LiDAR simulations
|
Visual Helios Simple Canvas is a class which supports rendering polygon meshes which are updated over time. More...
#include <VHSimpleCanvas.h>
Public Member Functions | |
VHSimpleCanvas () | |
Default constructor for the visual Helios simple canvas. More... | |
VHSimpleCanvas (string const title) | |
Constructor for the visual Helios simple canvas which allows for title specification. More... | |
void | appendDynObj (shared_ptr< VHDynObjectXYZRGBAdapter > dynObj) |
Append a dynamic object to the simple canvas. More... | |
VHDynObjectAdapter const & | getDynObj (size_t index) const |
Obtain a dynamic object from simple canvas. More... | |
void | setDynObj (size_t index, shared_ptr< VHDynObjectXYZRGBAdapter > dynObj) |
Replace a dynamic object in simple canvas. More... | |
void | clearDynObjs () |
Remove all dynamic objects from simple canvas. | |
void | setDynamicUpdateFunction (std::function< void(vector< shared_ptr< VHDynObjectXYZRGBAdapter >>)> const dynamicUpdateFunction) |
Set the dynamic update function. More... | |
![]() | |
VHNormalsCanvas () | |
Default constructor for the visual Helios normals canvas. More... | |
VHNormalsCanvas (string const title, bool const normalsKeyboardCallbackEnabled=true, bool const normalsUsageTextEnabled=true, bool const renderingNormals=true, float const normalMagnitude=1.0) | |
Main constructor for the visual helios normals canvas which allows for title specification, flags specification and normal magnitude specification too. More... | |
virtual bool | isRenderingNormals () const |
Check whether the normals canvas is rendering normals or not. More... | |
virtual void | setRenderingNormals (bool const renderingNormals) |
Enable or disable normals rendering. More... | |
virtual float | getNormalMagnitude () const |
Obtain the magnitude for normal vectors visualization. More... | |
virtual void | setNormalMagnitude (float const normalMagnitude) |
Set the magnitude for normal vectors visualization. More... | |
virtual bool | isNormalsKeyboardCallbackEnabled () const |
Check whether normals keyboard callback is enabled (true) or not (false) More... | |
virtual bool | isNormalsUsageTextEnabled () const |
Check whether normals usage text is enabled (true) or not (false) More... | |
virtual float const * | getNormalDefColor () const |
Return the default color for normals visualization. More... | |
virtual void | setNormalDefColor (float const color[3]) |
Set the default color for normals visualization. More... | |
virtual void | setNormalDefColor (float const r, float const g, float const b) |
Set the default color for normals visualization. More... | |
![]() | |
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 | configure () override |
void | start () override |
void | update () override |
void | renderNormals (VHStaticObjectAdapter &staticObj) override |
Render normals for each primitive of given static object. More... | |
void | unrenderAllNormals () override |
Remove all rendered normals. More... | |
![]() | |
virtual void | registerNormalsKeyboardCallback () |
Register the keyboard callback to toggle normals rendering on/off. More... | |
virtual void | addKeyboardCallbackUsageText () |
Render text explaining how to use the normals keyboard callback. More... | |
![]() | |
void | postUpdate () override |
Defines the default post update behavior for dynamic canvas and derived classes. More... | |
![]() | |
virtual void | onStop () |
Method to handle the behavior of the canvas after visualization has finished. | |
Protected Attributes | |
vector< shared_ptr< VHDynObjectXYZRGBAdapter > > | dynObjs |
The dynamic objects that must be rendered by the simple canvas. More... | |
std::function< void(vector< shared_ptr< VHDynObjectXYZRGBAdapter >>)> | dynamicUpdateFunction |
Function to define dynamic objects behavior before updating the canvas. More... | |
![]() | |
bool | normalsKeyboardCallbackEnabled |
Specify if the keyboard callback to toggle normals visualization is enabled (true) or not (false) | |
bool | normalsUsageTextEnabled |
Specify if the normals keyboard callback usage text is enabled (true) or not (false) | |
bool | renderingNormals |
Specify if the normals canvas must render normals (true) or not (false) | |
float | normalMagnitude |
Specify the magnitude of normal vector for visualization. | |
float | normalDefColor [3] |
Default color for normals in RGB format with components in \([0, 1]\). | |
![]() | |
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 Simple Canvas is a class which supports rendering polygon meshes which are updated over time.
|
inline |
Default constructor for the visual Helios simple canvas.
VHSimpleCanvas::VHSimpleCanvas | ( | string const | title | ) |
Constructor for the visual Helios simple canvas which allows for title specification.
title | Title for the visualizer |
|
inline |
Append a dynamic object to the simple canvas.
dynObj | Dynamic object to be appended |
|
overrideprotectedvirtual |
Reimplemented from visualhelios::VHNormalsCanvas.
|
inline |
Obtain a dynamic object from simple canvas.
index | Index of dynamic object to be obtained |
|
overrideprotectedvirtual |
Render normals for each primitive of given static object.
Implements visualhelios::VHNormalsCanvas.
|
inline |
Set the dynamic update function.
dynamicUpdateFunction | The dynamic update function |
|
inline |
Replace a dynamic object in simple canvas.
index | Index of dynamic object to be replaced |
dynObj | Dynamic object to replace with |
|
overrideprotectedvirtual |
Reimplemented from visualhelios::VHNormalsCanvas.
|
overrideprotectedvirtual |
Remove all rendered normals.
Implements visualhelios::VHNormalsCanvas.
|
overrideprotectedvirtual |
Reimplemented from visualhelios::VHCanvas.
|
protected |
Function to define dynamic objects behavior before updating the canvas.
It can be used to populate the motion queues or any other required manipulation over dynamic objects.
Simple canvas does not rely on components which update the dynamic object outside the canvas scope, so any implementation to define the behavior of dynamic objects must be done through this ad-hoc function
|
protected |
The dynamic objects that must be rendered by the simple canvas.