Helios++
Helios software for LiDAR simulations
|
Abstract class providing some behaviors and defining the interface for all canvas which deal with normals. More...
#include <VHNormalsCanvas.h>
Public Member Functions | |
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 |
virtual void | renderNormals (VHStaticObjectAdapter &dynObj)=0 |
Render normals for each primitive of given dynamic object. This method implementation must be provided by concrete derived classes so the logic of the VHNormalCanvas can be computed. More... | |
virtual void | unrenderAllNormals ()=0 |
Remove all rendered normals. This method implementation must be provided by concrete derived classes so the logic of the VHNormalCanvas can be computed. | |
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 | 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 | 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. | |
Abstract class providing some behaviors and defining the interface for all canvas which deal with normals.
|
inline |
Default constructor for the visual Helios normals canvas.
VHNormalsCanvas::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.
|
protectedvirtual |
Render text explaining how to use the normals keyboard callback.
This method is called during the start stage
|
overrideprotectedvirtual |
Reimplemented from visualhelios::VHCanvas.
Reimplemented in visualhelios::VHSimpleCanvas, visualhelios::VHSceneCanvas, and visualhelios::VHRaycastingCanvas.
|
inlinevirtual |
Return the default color for normals visualization.
|
inlinevirtual |
Obtain the magnitude for normal vectors visualization.
|
inlinevirtual |
Check whether normals keyboard callback is enabled (true) or not (false)
|
inlinevirtual |
Check whether normals usage text is enabled (true) or not (false)
|
inlinevirtual |
Check whether the normals canvas is rendering normals or not.
|
protectedvirtual |
Register the keyboard callback to toggle normals rendering on/off.
This method is called during configure stage
|
protectedpure virtual |
Render normals for each primitive of given dynamic object. This method implementation must be provided by concrete derived classes so the logic of the VHNormalCanvas can be computed.
dynObj | Dynamic object which normals will be rendered if enabled |
Implemented in visualhelios::VHSimpleCanvas, and visualhelios::VHSceneCanvas.
|
inlinevirtual |
Set the default color for normals visualization.
color | Default color for normals visualization |
|
inlinevirtual |
Set the default color for normals visualization.
r | Red component for normals default color |
g | Green component for normals default color |
b | Blue component for normals default color |
|
inlinevirtual |
Set the magnitude for normal vectors visualization.
normalMagnitude | New magnitude for normal vectors visualization |
|
inlinevirtual |
Enable or disable normals rendering.
renderingNormals | True to enable rendering normals, false to disable it |
|
overrideprotectedvirtual |
Reimplemented from visualhelios::VHCanvas.
Reimplemented in visualhelios::VHSimpleCanvas, visualhelios::VHSceneCanvas, and visualhelios::VHRaycastingCanvas.