Helios++
Helios software for LiDAR simulations
Leg.h
1 #pragma once
2 
3 #include <memory>
4 
5 #include "ScannerSettings.h"
6 #include "PlatformSettings.h"
7 #include <platform/trajectory/TrajectorySettings.h>
8 
9 class ScanningStrip;
10 #ifdef PYTHON_BINDING
11 namespace pyhelios{ class PyScanningStripWrapper; };
12 #endif
13 
17 class Leg {
18 public:
19  // *** ATTRIBUTES *** //
20  // ******************** //
25  std::shared_ptr<ScannerSettings> mScannerSettings;
30  std::shared_ptr<PlatformSettings> mPlatformSettings;
35  std::shared_ptr<TrajectorySettings> mTrajectorySettings = nullptr;
36 
40  bool wasProcessed{};
41 private:
45  double length = 0; // Distance to the next leg
52  int serialId;
57  std::shared_ptr<ScanningStrip> strip;
58 
59 public:
60  // *** CONSTRUCTION / DESTRUCTION *** //
61  // ************************************ //
65  Leg() : Leg(0, -1, nullptr) {}
72  Leg(
73  double const length,
74  int const serialId,
75  std::shared_ptr<ScanningStrip> strip
76  );
89  Leg(Leg &leg);
90  virtual ~Leg() {}
91 
92  // *** GETTERS and SETTERS *** //
93  // ***************************** //
99  inline double getLength() const {return this->length;}
105  inline void setLength(double const length) {this->length = length;}
112  {return *mScannerSettings;}
124  inline int getSerialId() const {return serialId;}
130  inline void setSerialId(int const serialId) {this->serialId = serialId;}
136  inline std::shared_ptr<ScanningStrip> getStrip() const {return strip;}
142  inline void setStrip(std::shared_ptr<ScanningStrip> strip)
143  {this->strip = strip;}
148  inline bool isContainedInAStrip() const {return strip!=nullptr;}
149 
150 #ifdef PYTHON_BINDING
151  pyhelios::PyScanningStripWrapper * getPyStrip() const;
152  void setPyStrip(pyhelios::PyScanningStripWrapper *pssw);
153 #endif
154 };
Class representing a survey leg.
Definition: Leg.h:17
std::shared_ptr< ScanningStrip > strip
The strip the leg belongs to. It is a nullptr if the leg does not belong to any strip at all.
Definition: Leg.h:57
double length
Distance to the next leg.
Definition: Leg.h:45
ScannerSettings & getScannerSettings() const
Obtain leg scanner settings by reference.
Definition: Leg.h:111
double getLength() const
Obtain distance to next leg.
Definition: Leg.h:99
int getSerialId() const
Obtain the serial identifier of the leg.
Definition: Leg.h:124
void setSerialId(int const serialId)
Set the leg serial identifier.
Definition: Leg.h:130
void setLength(double const length)
Set distance to next leg.
Definition: Leg.h:105
std::shared_ptr< ScanningStrip > getStrip() const
Obtain the scanning strip of the leg.
Definition: Leg.h:136
PlatformSettings & getPlatformSettings() const
Obtain leg platform settings by reference.
Definition: Leg.h:118
std::shared_ptr< TrajectorySettings > mTrajectorySettings
Trajectory settings for the leg.
Definition: Leg.h:35
bool wasProcessed
Boolean flag to store whether the leg was already processed.
Definition: Leg.h:40
std::shared_ptr< ScannerSettings > mScannerSettings
Scanner settings for the leg @se ScannerSettings.
Definition: Leg.h:25
void setStrip(std::shared_ptr< ScanningStrip > strip)
Set the leg scanning strip.
Definition: Leg.h:142
int serialId
The serial non negative integer unique identifier for the leg. If it is a negative integer,...
Definition: Leg.h:52
Leg()
Default leg constructor.
Definition: Leg.h:65
std::shared_ptr< PlatformSettings > mPlatformSettings
Platform settings for the leg.
Definition: Leg.h:30
bool isContainedInAStrip() const
Check whether the leg belongs to a strip (true) or not (false)
Definition: Leg.h:148
Class representing platform settings.
Definition: PlatformSettings.h:16
Scanner settings class.
Definition: ScannerSettings.h:16
A scanning strip is a set of legs which belong to the same strip. Thus, it is an abstract group of le...
Definition: ScanningStrip.h:24
Wrapper for ScanningStrip class.
Definition: PyScanningStripWrapper.h:17