Helios++
Helios software for LiDAR simulations
DynamicSceneDemo.h
1 #ifdef PCL_BINDING
2 #pragma once
3 
4 #include <demo/SurveyDemo.h>
5 #include <visualhelios/VHSceneCanvas.h>
6 #include <visualhelios/adapters/VHDynObjectXYZAdapter.h>
7 #include <Survey.h>
8 
9 #include <string>
10 
11 namespace HeliosDemos{
12 
15 
16 using std::string;
17 using std::shared_ptr;
18 
29 protected:
30  // *** ATTRIBUTES *** //
31  // ******************** //
36  shared_ptr<DynScene> dsWrapper = nullptr;
37 
38 public:
39  // *** CONSTRUCTION / DESTRUCTION *** //
40  // ************************************ //
45  DynamicSceneDemo(string const surveyPath, string const assetsPath) :
46  DynamicSceneDemo("Dynamic scene demo", surveyPath, assetsPath)
47  {}
53  string const name,
54  string const surveyPath,
55  string const assetsPath
56  ) :
58  {}
59  virtual ~DynamicSceneDemo() = default;
60 
61  // *** R U N *** //
62  // ***************** //
66  void run() override;
67 
68  // *** U T I L S *** //
69  // ********************* //
74  void validatePaths();
79  virtual shared_ptr<Survey> loadSurvey();
93  shared_ptr<VHSceneCanvas> buildCanvas(shared_ptr<Survey> survey);
94 };
95 
96 }
97 
98 #endif
string const name
The name for the demo.
Definition: BaseDemo.h:29
Dynamic scene demo.
Definition: DynamicSceneDemo.h:28
shared_ptr< DynScene > dsWrapper
Used to store the dynamic scene wrapper that must be used to render non dynamic scenes.
Definition: DynamicSceneDemo.h:36
DynamicSceneDemo(string const name, string const surveyPath, string const assetsPath)
Dynamic scene demo constructor.
Definition: DynamicSceneDemo.h:52
DynamicSceneDemo(string const surveyPath, string const assetsPath)
Dynamic scene demo constructor.
Definition: DynamicSceneDemo.h:45
void run() override
Definition: DynamicSceneDemo.cpp:21
shared_ptr< VHSceneCanvas > buildCanvas(shared_ptr< Survey > survey)
Build a visual Helios scene canvas from given survey.
Definition: DynamicSceneDemo.cpp:85
void validatePaths()
Validate survey and assets path. If any of them is not valid a proper exception is thrown.
Definition: DynamicSceneDemo.cpp:41
virtual shared_ptr< Survey > loadSurvey()
Load survey containing the scene to be rendered.
Definition: DynamicSceneDemo.cpp:55
SurveyDemo class.
Definition: SurveyDemo.h:26
string assetsPath
Path to the assets directory.
Definition: SurveyDemo.h:37
string surveyPath
Path to the survey XML file.
Definition: SurveyDemo.h:33
Class providing concrete implementation of a VHDynObjectAdapter for a simple XYZ visualization with n...
Definition: VHDynObjectXYZAdapter.h:22
Visual Helios Scene Canvas is a class which supports rendering a dynamic scene.
Definition: VHSceneCanvas.h:21