Helios++
Helios software for LiDAR simulations
visualhelios::VHRaycastingCanvas Class Reference

Visual Helios Ray casting Canvas is a class which supports rendering a dynamic scene together with the rays emitted by the scanner. More...

#include <VHRaycastingCanvas.h>

Inheritance diagram for visualhelios::VHRaycastingCanvas:
Collaboration diagram for visualhelios::VHRaycastingCanvas:

Public Member Functions

 VHRaycastingCanvas (DynScene &ds, Scanner &sc, Survey &sv)
 Default constructor for the visual Helios ray casting canvas. More...
 
 VHRaycastingCanvas (DynScene &ds, Scanner &sc, Survey &sv, string const title, bool const normalsKeyboardCallbackEnabled=true, bool const normalsUsageTextEnabled=true, bool const renderingNormals=true, float const normalMagnitude=0.2)
 Constructor for the visual Helios ray casting canvas which allows for title specification, flags configuration and normal magnitude specification. More...
 
void configure () override
 
void start () override
 
void update () override
 
- Public Member Functions inherited from visualhelios::VHSceneCanvas
 VHSceneCanvas (DynScene &ds)
 Default constructor for the visual Helios scene canvas. More...
 
 VHSceneCanvas (DynScene &ds, string const title, bool const normalsKeyboardCallbackEnabled=true, bool const normalsUsageTextEnabled=true, bool const renderingNormals=true, float const normalMagnitude=0.2)
 Constructor for the visual Helios scene canvas which allows for title specification, flags configuration and normal magnitude specification. More...
 
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...
 
- Public Member Functions inherited from visualhelios::VHNormalsCanvas
 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...
 
- Public Member Functions inherited from visualhelios::VHDynCanvas
 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...
 
- Public Member Functions inherited from visualhelios::VHCanvas
 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 Attributes

shared_ptr< VHScannerAdapterscanner
 The scanner which rays must be rendered.
 
bool rayRendered = false
 Flag to control whether there is a rendered ray (true) or not (false)
 
string rayOriginId = "SCANNER_RAY_ORIGIN"
 The identifier for the rendered shape that represents the origin of the ray.
 
string rayId = "SCANNER_RAY"
 The identifier for the rendered shape that represents the ray itself.
 
shared_ptr< VHDynSceneAdapter< VHStaticObjectXYZRGBAdapter, VHDynObjectXYZRGBAdapter > > dynScene
 The dynamic scene that must be rendered.
 
- Protected Attributes inherited from visualhelios::VHSceneCanvas
shared_ptr< VHDynSceneAdapter< VHStaticObjectXYZRGBAdapter, VHDynObjectXYZRGBAdapter > > dynScene
 The dynamic scene that must be rendered.
 
- Protected Attributes inherited from visualhelios::VHNormalsCanvas
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]\).
 
- Protected Attributes inherited from visualhelios::VHDynCanvas
bool needsUpdate = false
 Control whether an update is needed even when dynamic objects themselves have not been updated (true) or not (false)
 
- Protected Attributes inherited from visualhelios::VHCanvas
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.
 

Additional Inherited Members

- Protected Member Functions inherited from visualhelios::VHSceneCanvas
void cameraFromScene ()
 Set the camera position from the scene. More...
 
void unrenderNormals (size_t const m, std::function< ScenePart &(size_t const)> get)
 Unrender normals for objects obtained through given get function ranging in \([0, m)\). More...
 
void addObjectToViewer (VHStaticObjectXYZRGBAdapter &obj)
 Add given object to the viewer and render its normals if scene canvas is requested to render normals. More...
 
- Protected Member Functions inherited from visualhelios::VHNormalsCanvas
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...
 
- Protected Member Functions inherited from visualhelios::VHDynCanvas
void postUpdate () override
 Defines the default post update behavior for dynamic canvas and derived classes. More...
 
- Protected Member Functions inherited from visualhelios::VHCanvas
virtual void onStop ()
 Method to handle the behavior of the canvas after visualization has finished.
 
- Static Protected Attributes inherited from visualhelios::VHSceneCanvas
static double const cosPIeighth = std::cos(PI_EIGHTH)
 
static double const camCoef
 

Detailed Description

Visual Helios Ray casting Canvas is a class which supports rendering a dynamic scene together with the rays emitted by the scanner.

Author
Alberto M. Esmoris Pena
Version
1.0

Constructor & Destructor Documentation

◆ VHRaycastingCanvas() [1/2]

visualhelios::VHRaycastingCanvas::VHRaycastingCanvas ( DynScene ds,
Scanner sc,
Survey sv 
)
inline

Default constructor for the visual Helios ray casting canvas.

Parameters
dsThe scene to be rendered
scThe scanner which emitted rays must be rendered
svThe survey to which the scanner is associated

◆ VHRaycastingCanvas() [2/2]

VHRaycastingCanvas::VHRaycastingCanvas ( DynScene ds,
Scanner sc,
Survey sv,
string const  title,
bool const  normalsKeyboardCallbackEnabled = true,
bool const  normalsUsageTextEnabled = true,
bool const  renderingNormals = true,
float const  normalMagnitude = 0.2 
)

Constructor for the visual Helios ray casting canvas which allows for title specification, flags configuration and normal magnitude specification.

See also
VHNormalsCanvas(string const, bool const, bool const, bool cont, float const)
VHRaycastingCanvas::VHRaycastingCanvas(DynScene &, Scanner &)

Member Function Documentation

◆ configure()

void VHRaycastingCanvas::configure ( )
overridevirtual

◆ start()

void VHRaycastingCanvas::start ( )
overridevirtual

◆ update()

void VHRaycastingCanvas::update ( )
overridevirtual
See also
VHSceneCanvas::update

Reimplemented from visualhelios::VHCanvas.


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