Helios++
Helios software for LiDAR simulations
PlatformSettings Class Reference

Class representing platform settings. More...

#include <PlatformSettings.h>

Inheritance diagram for PlatformSettings:
Collaboration diagram for PlatformSettings:

Public Member Functions

 PlatformSettings ()=default
 Platform settings default constructor.
 
 PlatformSettings (PlatformSettings *other)
 Copy from pointer constructor. More...
 
std::shared_ptr< PlatformSettingscherryPick (std::shared_ptr< PlatformSettings > cherries, std::unordered_set< std::string > const &fields, std::unordered_set< std::string > const *templateFields=nullptr)
 Build a new platform settings which by default has the same values than caller platform settings (this). Any field specified through fields set will be overloaded from cherries platform settings. More...
 
glm::dvec3 getPosition ()
 Obtain position as 3D vector. More...
 
void setPosition (glm::dvec3 dest)
 Set position from 3D vector. More...
 
void setPosition (double const x, double const y, double const z)
 
bool hasTemplate ()
 Check if this PlatformSettings has an associated template (true) or not (false) More...
 
PlatformSettingsgetTemplate ()
 Obtain template by reference. More...
 
virtual std::string toString () const
 Obtain the string representation of the scanner settings. More...
 
- Public Member Functions inherited from Asset
std::string getLocationString ()
 Obtain asset location string. More...
 
virtual bool isEgg () const
 Check whether the asset is an EggAsset or not. More...
 

Public Attributes

std::string id = "#nullid#"
 The ID for this platform settings. It does not make sense for all platform settings, but it is specially useful when it comes to handling XML templates.
 
std::shared_ptr< PlatformSettingsbaseTemplate = nullptr
 Template defining default values which were used to build the PlatformSettings object.
 
double x = 0
 Position x coordinate.
 
double y = 0
 Position y coordinate.
 
double z = 0
 Position z coordinate.
 
bool yawAtDepartureSpecified = false
 Flag.
 
double yawAtDeparture = 0.0
 Yaw angle (in radians) at platform departure.
 
bool onGround = false
 On ground flag. More...
 
bool stopAndTurn = true
 Stop and turn flag. More...
 
bool smoothTurn = false
 Smooth turn. More...
 
bool slowdownEnabled = true
 Slowdown enabled flag. More...
 
double movePerSec_m = 70
 Movement per seconds (in meters)
 
- Public Attributes inherited from Asset
std::string id = ""
 Asset identifier.
 
std::string name = "Unnamed Asset"
 Asset name.
 
std::string sourceFilePath = ""
 Path to asset file.
 

Friends

std::ostream & operator<< (std::ostream &out, PlatformSettings const &settings)
 Overload of << operator for output streams.
 

Detailed Description

Class representing platform settings.

Constructor & Destructor Documentation

◆ PlatformSettings()

PlatformSettings::PlatformSettings ( PlatformSettings other)
inline

Copy from pointer constructor.

Parameters
otherPlatform settings to be copied

Member Function Documentation

◆ cherryPick()

std::shared_ptr<PlatformSettings> PlatformSettings::cherryPick ( std::shared_ptr< PlatformSettings cherries,
std::unordered_set< std::string > const &  fields,
std::unordered_set< std::string > const *  templateFields = nullptr 
)
inline

Build a new platform settings which by default has the same values than caller platform settings (this). Any field specified through fields set will be overloaded from cherries platform settings.

Parameters
cherriesFrom where overloaded values are taken
[in]fieldsWhich fields must be overloaded
[in]templateFieldsWhich fields must be overloaded for the template. Notice it can be nullptr in case there is no cherry template
Returns
New platform settings from cherry picking

◆ getPosition()

glm::dvec3 PlatformSettings::getPosition ( )
inline

Obtain position as 3D vector.

Returns
Position as 3D vector

◆ getTemplate()

PlatformSettings& PlatformSettings::getTemplate ( )
inline

Obtain template by reference.

Returns
Reference to template associated to this PlatformSettings
See also
PlatformSettings::baseTemplate
PlatformSettings::hasTemplate

◆ hasTemplate()

bool PlatformSettings::hasTemplate ( )
inline

Check if this PlatformSettings has an associated template (true) or not (false)

Returns
True when there is an associated template, false otherwise
See also
PlatformSettings::baseTemplate
PlatformSettings::hasTemplate

◆ setPosition()

void PlatformSettings::setPosition ( glm::dvec3  dest)
inline

Set position from 3D vector.

Parameters
destPosition as 3D vector

◆ toString()

virtual std::string PlatformSettings::toString ( ) const
inlinevirtual

Obtain the string representation of the scanner settings.

Returns
String representing the scanner settings

Member Data Documentation

◆ onGround

bool PlatformSettings::onGround = false

On ground flag.

See also
Platform::onGround

◆ slowdownEnabled

bool PlatformSettings::slowdownEnabled = true

Slowdown enabled flag.

See also
Platform::slowdownEnabled

◆ smoothTurn

bool PlatformSettings::smoothTurn = false

Smooth turn.

See also
Platform::smoothTurn

◆ stopAndTurn

bool PlatformSettings::stopAndTurn = true

Stop and turn flag.

See also
Platform::stopAndTurn

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