Helios++
Helios software for LiDAR simulations
VHRaycastingCanvas.h
1 #ifdef PCL_BINDING
2 #pragma once
3 
4 #include <visualhelios/VHSceneCanvas.h>
5 #include <visualhelios/adapters/VHScannerAdapter.h>
6 
7 #include <memory>
8 
9 namespace visualhelios{
10 
11 using std::shared_ptr;
12 using std::string;
13 
21 protected:
23 
24  // *** ATTRIBUTES *** //
25  // ******************** //
29  shared_ptr<VHScannerAdapter> scanner;
34  bool rayRendered = false;
39  string rayOriginId = "SCANNER_RAY_ORIGIN";
44  string rayId = "SCANNER_RAY";
45 
46 public:
47  // *** CONSTRUCTION / DESTRUCTION *** //
48  // ************************************ //
56  VHRaycastingCanvas(ds, sc, sv, "Visual Helios ray casting canvas")
57  {}
66  DynScene &ds,
67  Scanner &sc,
68  Survey &sv,
69  string const title,
70  bool const normalsKeyboardCallbackEnabled=true,
71  bool const normalsUsageTextEnabled=true,
72  bool const renderingNormals=true,
73  float const normalMagnitude=0.2
74  );
75  virtual ~VHRaycastingCanvas() = default;
76 
77  // *** CANVAS METHODS *** //
78  // ************************ //
82  void configure() override;
86  void start() override;
90  void update() override;
91 };
92 }
93 
94 #endif
Dynamic scene base implementation.
Definition: DynScene.h:29
Class representing a scanner asset.
Definition: Scanner.h:28
Class representing a Helios++ survey.
Definition: Survey.h:13
string const title
The title of the visual Helios canvas.
Definition: VHCanvas.h:36
bool normalsKeyboardCallbackEnabled
Specify if the keyboard callback to toggle normals visualization is enabled (true) or not (false)
Definition: VHNormalsCanvas.h:24
bool renderingNormals
Specify if the normals canvas must render normals (true) or not (false)
Definition: VHNormalsCanvas.h:34
float normalMagnitude
Specify the magnitude of normal vector for visualization.
Definition: VHNormalsCanvas.h:38
bool normalsUsageTextEnabled
Specify if the normals keyboard callback usage text is enabled (true) or not (false)
Definition: VHNormalsCanvas.h:29
Visual Helios Ray casting Canvas is a class which supports rendering a dynamic scene together with th...
Definition: VHRaycastingCanvas.h:20
bool rayRendered
Flag to control whether there is a rendered ray (true) or not (false)
Definition: VHRaycastingCanvas.h:34
string rayId
The identifier for the rendered shape that represents the ray itself.
Definition: VHRaycastingCanvas.h:44
void update() override
Definition: VHRaycastingCanvas.cpp:57
shared_ptr< VHScannerAdapter > scanner
The scanner which rays must be rendered.
Definition: VHRaycastingCanvas.h:29
void configure() override
Definition: VHRaycastingCanvas.cpp:39
string rayOriginId
The identifier for the rendered shape that represents the origin of the ray.
Definition: VHRaycastingCanvas.h:39
void start() override
Definition: VHRaycastingCanvas.cpp:50
VHRaycastingCanvas(DynScene &ds, Scanner &sc, Survey &sv)
Default constructor for the visual Helios ray casting canvas.
Definition: VHRaycastingCanvas.h:55
Visual Helios Scene Canvas is a class which supports rendering a dynamic scene.
Definition: VHSceneCanvas.h:21
shared_ptr< VHDynSceneAdapter< VHStaticObjectXYZRGBAdapter, VHDynObjectXYZRGBAdapter > > dynScene
The dynamic scene that must be rendered.
Definition: VHSceneCanvas.h:46