Helios++
Helios software for LiDAR simulations
Survey.h
1 #pragma once
2 
3 #include "Asset.h"
4 #include "Scanner.h"
5 #include "AbstractDetector.h"
6 #include "Leg.h"
7 
11 class Survey : public Asset {
12 public:
13  // *** ATTRIBUTES *** //
14  // ******************** //
18  std::string name = "Unnamed Survey Playback";
22  int numRuns = -1;
27  std::shared_ptr<Scanner> scanner = nullptr;
31  double simSpeedFactor = 1;
36  std::vector<std::shared_ptr<Leg>> legs;
37 
38 private:
42  double length = 0; // Distance passing through all the legs
43 
44 public:
45  // *** CONSTRUCTION / DESTRUCTION *** //
46  // ************************************ //
50  Survey() = default;
51  Survey(Survey &survey);
52  ~Survey() override {scanner->detector->scanner = nullptr;}
53 
54  // *** M E T H O D S *** //
55  // *********************** //
62  void addLeg(int insertIndex, std::shared_ptr<Leg> leg);
68  void removeLeg(int legIndex);
69 
74  void calculateLength();
80  double getLength();
81 };
Base class for all assets.
Definition: Asset.h:10
double length
Distance passing through all legs.
Definition: Survey.h:42
double simSpeedFactor
Simulation speed factor for the survey.
Definition: Survey.h:31
std::string name
Survey name.
Definition: Survey.h:18
void addLeg(int insertIndex, std::shared_ptr< Leg > leg)
Add a leg to the survey at given index.
Definition: Survey.cpp:31
int numRuns
Number of runs for the survey.
Definition: Survey.h:22
Survey()=default
Survey default constructor.
std::shared_ptr< Scanner > scanner
Scanner used by the survey.
Definition: Survey.h:27
Class representing a Helios++ survey.
Definition: Survey.h:11
double getLength()
Obtain survey length (distance passing through all legs)
Definition: Survey.cpp:54
void calculateLength()
Compute survey length (distance passing through all legs)
Definition: Survey.cpp:41
std::vector< std::shared_ptr< Leg > > legs
All legs belonging to the survey.
Definition: Survey.h:36
void removeLeg(int legIndex)
Remove a leg from the survey.
Definition: Survey.cpp:37