From e5f6698b99882556b5283a962aee8c322f2d8bee Mon Sep 17 00:00:00 2001 From: uadmin Date: Mon, 16 Aug 2021 16:52:18 +0200 Subject: [PATCH] Minor fixes on visualhelios documentation. Also, added operator*() for Rotation as requested by JXO --- .../d0/d0e/XmlAssetsLoader_8h_source.html | 2 +- doc/html/d0/d8f/Rotation_8h_source.html | 14 +++++------ .../d0/dd2/PyScenePartWrapper_8h_source.html | 2 +- .../d1/dd9/PyPlatformWrapper_8h_source.html | 2 +- doc/html/d2/dd0/ScannerHead_8h_source.html | 2 +- doc/html/d3/d0b/typedef_8h_source.html | 10 ++++---- .../d3/d6f/AbstractDetector_8h_source.html | 2 +- .../FullWaveformPulseDetector_8h_source.html | 2 +- .../d4/d6d/ConicBeamDeflector_8h_source.html | 2 +- doc/html/d5/d6c/SurveyCopyTest_8h_source.html | 10 ++++---- doc/html/d5/d7f/Voxel_8h_source.html | 2 +- doc/html/d5/dcb/classRotation.html | 21 ++++++++++++++++- .../df8/PyBeamDeflectorWrapper_8h_source.html | 2 +- doc/html/d6/d03/ScenePart_8h_source.html | 2 +- ...ualhelios_1_1VHDynObjectXYZRGBAdapter.html | 2 +- .../d6/dd5/HelicopterPlatform_8h_source.html | 2 +- .../d34/AbstractBeamDeflector_8h_source.html | 2 +- doc/html/d7/d3f/RotateFilter_8h_source.html | 2 +- doc/html/d7/d5d/Primitive_8h_source.html | 2 +- .../d9e/AbstractPulseRunnable_8h_source.html | 2 +- .../FullWaveformPulseRunnable_8h_source.html | 2 +- doc/html/d9/dd0/Platform_8h_source.html | 2 +- doc/html/da/d62/Scanner_8h_source.html | 2 +- ...visualhelios_1_1VHDynObjectXYZAdapter.html | 2 +- src/maths/Rotation.h | 23 ++++++++++--------- .../adapters/VHDynObjectXYZAdapter.h | 2 +- .../adapters/VHDynObjectXYZRGBAdapter.h | 2 +- 27 files changed, 71 insertions(+), 51 deletions(-) diff --git a/doc/html/d0/d0e/XmlAssetsLoader_8h_source.html b/doc/html/d0/d0e/XmlAssetsLoader_8h_source.html index 17a042465..ad12ddd9c 100644 --- a/doc/html/d0/d0e/XmlAssetsLoader_8h_source.html +++ b/doc/html/d0/d0e/XmlAssetsLoader_8h_source.html @@ -94,7 +94,7 @@
std::shared_ptr< Asset > getAssetById(std::string type, std::string id)
Get asset by its identifier.
Definition: XmlAssetsLoader.cpp:905
XmlAssetsLoader(std::string &filePath, std::string &assetsDir)
Build a XmlAssetsLoader for given XML file and assets directory.
Definition: XmlAssetsLoader.cpp:46
std::shared_ptr< Asset > getAssetByLocation(std::string type, std::string location)
Get asset by location.
Definition: XmlAssetsLoader.cpp:944
-
Definition: Rotation.h:81
+
Definition: Rotation.h:80
Color4f createColorFromXml(tinyxml2::XMLElement *node)
Create a color from given XML element (node)
Definition: XmlAssetsLoader.cpp:103
Rotation createRotationFromXml(tinyxml2::XMLElement *rotGroupNode)
Create a rotation from given XML element (node)
Definition: XmlAssetsLoader.cpp:849
std::shared_ptr< PlatformSettings > createPlatformSettingsFromXml(tinyxml2::XMLElement *node)
Create platform settings from given XML element (node)
Definition: XmlAssetsLoader.cpp:288
diff --git a/doc/html/d0/d8f/Rotation_8h_source.html b/doc/html/d0/d8f/Rotation_8h_source.html index 2bf3abad2..a5662fbfc 100644 --- a/doc/html/d0/d8f/Rotation_8h_source.html +++ b/doc/html/d0/d8f/Rotation_8h_source.html @@ -90,17 +90,17 @@
Rotation.h
-
1 #pragma once
2 
71 #include "RotationOrder.h"
72 
73 #include <boost/archive/text_iarchive.hpp>
74 #include <boost/archive/text_oarchive.hpp>
75 
76 #if PYTHON_BINDING
77 #include <PythonDVec3.h>
79 #endif
80 
81 class Rotation {
82  // *** SERIALIZATION *** //
83  // *********************** //
84  friend class boost::serialization::access;
85  template<class Archive>
86  void serialize(Archive &ar, const unsigned int version) {
87  ar & q0 & q1 & q2 & q3;
88  }
89 
90  // *** ATTRIBUTES *** //
91  // ******************** //
93  double q0, q1, q2, q3;
94 
95 public:
96  // *** CONSTRUCTION / DESTRUCTION *** //
97  // ************************************ //
98  Rotation() = default;
99  Rotation(double q0, double q1, double q2, double q3, bool needsNormalization);
100  Rotation(glm::dvec3 axis, double angle);
101  Rotation(glm::dvec3 u, glm::dvec3 v);
102  Rotation(RotationOrder order, double alpha1, double alpha2, double alpha3);
103  virtual ~Rotation() = default;
104 
105 
106 
108  //const Rotation *IDENTITY = new Rotation(1.0, 0.0, 0.0, 0.0, false);
109 
110  // *** GETTERS and SETTERS *** //
111  // ***************************** //
116  double getQ0() {return q0;}
117  void setQ0(double q0) {this->q0 = q0;}
118 
123  double getQ1() {return q1;}
124  void setQ1(double q1) {this->q1 = q1;}
125 
131  double getQ2() {return q2;}
132  void setQ2(double q2) {this->q2 = q2;}
133 
138  double getQ3() {return q3;}
139  void setQ3(double q3) {this->q3 = q3;}
140 
141  // *** M E T H O D S *** //
142  // *********************** //
143  Rotation revert();
144  glm::dvec3 getAxis();
145  double getAngle();
146  double** getMatrix();
147  glm::dvec3 applyTo(glm::dvec3 u);
148  void applyTo(double* in, double* out);
149  glm::dvec3 applyInverseTo(glm::dvec3 u);
150  void applyInverseTo(double* in, double* out);
153 
161  void getAngles(
162  RotationOrder const *order,
163  double &roll,
164  double &pitch,
165  double &yaw
166  );
167 
168  friend std::ostream& operator << (std::ostream& out, Rotation& r);
169 
170 #ifdef PYTHON_BINDING
171  PythonDVec3 * getAxisPython() {return new PythonDVec3(getAxis());}
172 #endif
173 
174 };
glm::dvec3 applyTo(glm::dvec3 u)
Definition: Rotation.cpp:250
-
Definition: Rotation.h:81
-
double q0
Definition: Rotation.h:93
-
double getQ0()
Get the scalar coordinate of the quaternion.
Definition: Rotation.h:116
-
double getQ3()
Get the third coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:138
+
1 #pragma once
2 
3 #include "RotationOrder.h"
4 
5 #include <boost/archive/text_iarchive.hpp>
6 #include <boost/archive/text_oarchive.hpp>
7 
8 #if PYTHON_BINDING
9 #include <PythonDVec3.h>
11 #endif
12 
80 class Rotation {
81  // *** SERIALIZATION *** //
82  // *********************** //
83  friend class boost::serialization::access;
84  template<class Archive>
85  void serialize(Archive &ar, const unsigned int version) {
86  ar & q0 & q1 & q2 & q3;
87  }
88 
89  // *** ATTRIBUTES *** //
90  // ******************** //
92  double q0, q1, q2, q3;
93 
94 public:
95  // *** CONSTRUCTION / DESTRUCTION *** //
96  // ************************************ //
97  Rotation() = default;
98  Rotation(double q0, double q1, double q2, double q3, bool needsNormalization);
99  Rotation(glm::dvec3 axis, double angle);
100  Rotation(glm::dvec3 u, glm::dvec3 v);
101  Rotation(RotationOrder order, double alpha1, double alpha2, double alpha3);
102  virtual ~Rotation() = default;
103 
104 
105 
107  //const Rotation *IDENTITY = new Rotation(1.0, 0.0, 0.0, 0.0, false);
108 
109  // *** GETTERS and SETTERS *** //
110  // ***************************** //
115  double getQ0() {return q0;}
116  void setQ0(double q0) {this->q0 = q0;}
117 
122  double getQ1() {return q1;}
123  void setQ1(double q1) {this->q1 = q1;}
124 
130  double getQ2() {return q2;}
131  void setQ2(double q2) {this->q2 = q2;}
132 
137  double getQ3() {return q3;}
138  void setQ3(double q3) {this->q3 = q3;}
139 
140  // *** M E T H O D S *** //
141  // *********************** //
142  Rotation revert();
143  glm::dvec3 getAxis();
144  double getAngle();
145  double** getMatrix();
146  glm::dvec3 applyTo(glm::dvec3 u);
147  void applyTo(double* in, double* out);
148  glm::dvec3 applyInverseTo(glm::dvec3 u);
149  void applyInverseTo(double* in, double* out);
152 
160  void getAngles(
161  RotationOrder const *order,
162  double &roll,
163  double &pitch,
164  double &yaw
165  );
166 
167  friend std::ostream& operator << (std::ostream& out, Rotation& r);
168 
169 #ifdef PYTHON_BINDING
170  PythonDVec3 * getAxisPython() {return new PythonDVec3(getAxis());}
171 #endif
172 
173 };
glm::dvec3 applyTo(glm::dvec3 u)
Definition: Rotation.cpp:250
+
Definition: Rotation.h:80
+
double q0
Definition: Rotation.h:92
+
double getQ0()
Get the scalar coordinate of the quaternion.
Definition: Rotation.h:115
+
double getQ3()
Get the third coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:137
double ** getMatrix()
Definition: Rotation.cpp:210
Definition: RotationOrder.h:18
Rotation revert()
Definition: Rotation.cpp:171
-
double getQ1()
Get the first coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:123
+
double getQ1()
Get the first coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:122
double getAngle()
Definition: Rotation.cpp:196
-
double getQ2()
Get the second coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:131
+
double getQ2()
Get the second coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:130
void getAngles(RotationOrder const *order, double &roll, double &pitch, double &yaw)
Get the roll, pitch and yaw for the Rotation.
Definition: Rotation.cpp:360
friend std::ostream & operator<<(std::ostream &out, Rotation &r)
Definition: Rotation.cpp:527
glm::dvec3 applyInverseTo(glm::dvec3 u)
Definition: Rotation.cpp:287
diff --git a/doc/html/d0/dd2/PyScenePartWrapper_8h_source.html b/doc/html/d0/dd2/PyScenePartWrapper_8h_source.html index 4c9f44956..f1096daf4 100644 --- a/doc/html/d0/dd2/PyScenePartWrapper_8h_source.html +++ b/doc/html/d0/dd2/PyScenePartWrapper_8h_source.html @@ -90,7 +90,7 @@
PyScenePartWrapper.h
-
1 #pragma once
2 
3 #ifdef PYTHON_BINDING
4 
5 #include <ScenePart.h>
6 
7 namespace pyhelios{
8 
17 public:
18  // *** ATTRIBUTES *** //
19  // ******************** //
20  ScenePart &sp;
21 
22  // *** CONSTRUCTION / DESTRUCTION *** //
23  // ************************************ //
24  PyScenePartWrapper(ScenePart &sp) : sp(sp) {}
25  virtual ~PyScenePartWrapper() {}
26 
27  // *** GETTERS and SETTERS *** //
28  // ***************************** //
29  std::string getId() {return sp.mId;};
30  void setId(std::string id) {sp.mId = id;}
31  PythonDVec3 * getOrigin() {return new PythonDVec3(sp.mOrigin);}
32  void setOrigin(double x, double y, double z)
33  {sp.mOrigin = glm::dvec3(x, y, z);}
34  Rotation & getRotation() {return sp.mRotation;}
35  void setRotation(double x, double y, double z, double angle)
36  {sp.mRotation = Rotation(glm::dvec3(x, y, z), angle);}
37  double getScale() {return sp.mScale;}
38  void setScale(double scale) {sp.mScale = scale;}
39 };
40 
41 }
42 
43 #endif
Definition: Rotation.h:81
+
1 #pragma once
2 
3 #ifdef PYTHON_BINDING
4 
5 #include <ScenePart.h>
6 
7 namespace pyhelios{
8 
17 public:
18  // *** ATTRIBUTES *** //
19  // ******************** //
20  ScenePart &sp;
21 
22  // *** CONSTRUCTION / DESTRUCTION *** //
23  // ************************************ //
24  PyScenePartWrapper(ScenePart &sp) : sp(sp) {}
25  virtual ~PyScenePartWrapper() {}
26 
27  // *** GETTERS and SETTERS *** //
28  // ***************************** //
29  std::string getId() {return sp.mId;};
30  void setId(std::string id) {sp.mId = id;}
31  PythonDVec3 * getOrigin() {return new PythonDVec3(sp.mOrigin);}
32  void setOrigin(double x, double y, double z)
33  {sp.mOrigin = glm::dvec3(x, y, z);}
34  Rotation & getRotation() {return sp.mRotation;}
35  void setRotation(double x, double y, double z, double angle)
36  {sp.mRotation = Rotation(glm::dvec3(x, y, z), angle);}
37  double getScale() {return sp.mScale;}
38  void setScale(double scale) {sp.mScale = scale;}
39 };
40 
41 }
42 
43 #endif
Definition: Rotation.h:80
Wrapper for ScenePart class.
Definition: PyScenePartWrapper.h:16
Rotation mRotation
Specify the rotation for the scene part.
Definition: ScenePart.h:85
Definition: PyAABBWrapper.h:7
diff --git a/doc/html/d1/dd9/PyPlatformWrapper_8h_source.html b/doc/html/d1/dd9/PyPlatformWrapper_8h_source.html index 42221ca06..aab426a54 100644 --- a/doc/html/d1/dd9/PyPlatformWrapper_8h_source.html +++ b/doc/html/d1/dd9/PyPlatformWrapper_8h_source.html @@ -95,7 +95,7 @@
bool smoothTurn
Flag to specify if platform must work in smooth turn mode (true) or not (false). Not all platforms su...
Definition: Platform.h:121
Class representing a platform asset.
Definition: Platform.h:21
glm::dvec3 cached_vectorToTarget_xy
Distance vector from current position to target over XY plane (z is always 0)
Definition: Platform.h:178
-
Definition: Rotation.h:81
+
Definition: Rotation.h:80
Wrapper for NoiseSource abstract class.
Definition: PyNoiseSourceWrapper.h:16
glm::dvec3 position
Platform 3D position.
Definition: Platform.h:133
std::shared_ptr< NoiseSource< double > > attitudeXNoiseSource
Noise source for x component of platform attitude.
Definition: Platform.h:65
diff --git a/doc/html/d2/dd0/ScannerHead_8h_source.html b/doc/html/d2/dd0/ScannerHead_8h_source.html index 3d20498e7..b05b5e483 100644 --- a/doc/html/d2/dd0/ScannerHead_8h_source.html +++ b/doc/html/d2/dd0/ScannerHead_8h_source.html @@ -95,7 +95,7 @@
glm::dvec3 cfg_device_rotateAxis
Rotation axis.
Definition: ScannerHead.h:57
Rotation cached_mountRelativeAttitude
Relative scanner head mount attitude.
Definition: ScannerHead.h:50
double cfg_setting_rotatePerSec_rad
Rotation per second (radians)
Definition: ScannerHead.h:26
-
Definition: Rotation.h:81
+
Definition: Rotation.h:80
bool rotateCompleted()
Check if rotation has been completed.
Definition: ScannerHead.cpp:35
double cfg_setting_rotateRange_rad
Difference between rotation stop and start angles (radians)
Definition: ScannerHead.h:38
double getRotateRange()
Get rotation range.
Definition: ScannerHead.h:186
diff --git a/doc/html/d3/d0b/typedef_8h_source.html b/doc/html/d3/d0b/typedef_8h_source.html index baecd3d74..7523276d9 100644 --- a/doc/html/d3/d0b/typedef_8h_source.html +++ b/doc/html/d3/d0b/typedef_8h_source.html @@ -90,13 +90,13 @@
typedef.h
-
1 #pragma once
2 
3 #include <iostream>
4 #include <string>
5 #include <sstream>
6 
7 #include <glm/glm.hpp>
8 #include <glm/gtx/string_cast.hpp>
9 
10 #include "maths/Rotation.h"
11 
12 #include <boost/variant/get.hpp>
13 #include <boost/variant/variant.hpp>
14 
15 
19 typedef boost::variant<
20  bool, int, float, double, std::string, glm::dvec3, Rotation
21 > ObjectT;
22 
27 struct stringVisitor : public boost::static_visitor<std::string>{
31  std::string operator() (bool b) const {
32  std::stringstream ss;
33  ss << b;
34  return ss.str();
35  }
39  std::string operator() (int i) const {
40  std::stringstream ss;
41  ss << i;
42  return ss.str();
43  }
47  std::string operator() (float f) const {
48  std::stringstream ss;
49  ss << f;
50  return ss.str();
51  }
55  std::string operator() (double d) const {
56  std::stringstream ss;
57  ss << d;
58  return ss.str();
59  }
63  std::string operator() (std::string const & s) const {
64  std::stringstream ss;
65  ss << s;
66  return ss.str();
67  }
71  std::string operator() (glm::dvec3 v) const {
72  std::stringstream ss;
73  ss << glm::to_string(v);
74  return ss.str();
75  }
80  std::string operator() (Rotation r) const {
81  std::stringstream ss;
82  ss << r.getQ0() << '\n' << r.getQ1() << '\n' << r.getQ2()
83  << '\n' << r.getQ3();
84  return ss.str();
85  }
86 };
87 
88 // "C/C++, unfortunately, does not have a sgn function in its standard library,
89 // however this is defined in the Boost library."
93 template <typename T> int sgn(T val) {
94  return (T(0) < val) - (val < T(0));
95 }
96 
Definition: Rotation.h:81
-
double getQ0()
Get the scalar coordinate of the quaternion.
Definition: Rotation.h:116
+
1 #pragma once
2 
3 #include <iostream>
4 #include <string>
5 #include <sstream>
6 
7 #include <glm/glm.hpp>
8 #include <glm/gtx/string_cast.hpp>
9 
10 #include "maths/Rotation.h"
11 
12 #include <boost/variant/get.hpp>
13 #include <boost/variant/variant.hpp>
14 
15 
19 typedef boost::variant<
20  bool, int, float, double, std::string, glm::dvec3, Rotation
21 > ObjectT;
22 
27 struct stringVisitor : public boost::static_visitor<std::string>{
31  std::string operator() (bool b) const {
32  std::stringstream ss;
33  ss << b;
34  return ss.str();
35  }
39  std::string operator() (int i) const {
40  std::stringstream ss;
41  ss << i;
42  return ss.str();
43  }
47  std::string operator() (float f) const {
48  std::stringstream ss;
49  ss << f;
50  return ss.str();
51  }
55  std::string operator() (double d) const {
56  std::stringstream ss;
57  ss << d;
58  return ss.str();
59  }
63  std::string operator() (std::string const & s) const {
64  std::stringstream ss;
65  ss << s;
66  return ss.str();
67  }
71  std::string operator() (glm::dvec3 v) const {
72  std::stringstream ss;
73  ss << glm::to_string(v);
74  return ss.str();
75  }
80  std::string operator() (Rotation r) const {
81  std::stringstream ss;
82  ss << r.getQ0() << '\n' << r.getQ1() << '\n' << r.getQ2()
83  << '\n' << r.getQ3();
84  return ss.str();
85  }
86 };
87 
88 // "C/C++, unfortunately, does not have a sgn function in its standard library,
89 // however this is defined in the Boost library."
93 template <typename T> int sgn(T val) {
94  return (T(0) < val) - (val < T(0));
95 }
96 
Definition: Rotation.h:80
+
double getQ0()
Get the scalar coordinate of the quaternion.
Definition: Rotation.h:115
std::string operator()(bool b) const
String visitor behavior fo bool type.
Definition: typedef.h:31
-
double getQ3()
Get the third coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:138
+
double getQ3()
Get the third coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:137
stringVisitor defines a different string building behavior for different printable objects ...
Definition: typedef.h:27
-
double getQ1()
Get the first coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:123
-
double getQ2()
Get the second coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:131
+
double getQ1()
Get the first coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:122
+
double getQ2()
Get the second coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:130
diff --git a/doc/html/d3/d6f/AbstractDetector_8h_source.html b/doc/html/d3/d6f/AbstractDetector_8h_source.html index a46dda6ad..c8376b9df 100644 --- a/doc/html/d3/d6f/AbstractDetector_8h_source.html +++ b/doc/html/d3/d6f/AbstractDetector_8h_source.html @@ -94,7 +94,7 @@
double cfg_device_accuracy_m
Detector accuracy in meters.
Definition: AbstractDetector.h:42
virtual void shutdown()
Shutdown the detector when simulation has finished.
Definition: AbstractDetector.cpp:65
bool lasOutput
Flag specifying if detector output must be written in LAS format (true) or not (false) ...
Definition: AbstractDetector.h:54
-
Definition: Rotation.h:81
+
Definition: Rotation.h:80
bool las10
Flag specifying if detect output must be writing in LAS 1.0 (LAS 1.4 is written by default) ...
Definition: AbstractDetector.h:59
std::string outputFileLineFormatString
Format string for output file line.
Definition: AbstractDetector.h:78
double lasScale
Scale factor specification to be used when LAS output format specified.
Definition: AbstractDetector.h:70
diff --git a/doc/html/d3/dbe/FullWaveformPulseDetector_8h_source.html b/doc/html/d3/dbe/FullWaveformPulseDetector_8h_source.html index 2efeacd78..2f72ded7b 100644 --- a/doc/html/d3/dbe/FullWaveformPulseDetector_8h_source.html +++ b/doc/html/d3/dbe/FullWaveformPulseDetector_8h_source.html @@ -93,7 +93,7 @@
1 #pragma once
2 
3 #include <boost/asio/thread_pool.hpp>
4 #include <boost/asio/post.hpp>
5 
6 #include "AbstractDetector.h"
7 
15  // *** ATTRIBUTES *** //
16  // ******************** //
21  std::shared_ptr<SyncFileWriter> fw_sfw;
22 
23 public:
24  // *** CONSTRUCTION / DESTRUCTION *** //
25  // ************************************ //
32  std::shared_ptr<Scanner> scanner,
33  double accuracy_m,
34  double range_min
35  ) : AbstractDetector(scanner, accuracy_m, range_min) {}
36  std::shared_ptr<AbstractDetector> clone() override;
37  void _clone(std::shared_ptr<AbstractDetector> ad) override;
38 
39  // *** M E T H O D S *** //
40  // *********************** //
44  void shutdown() override;
45  void writeFullWave(
46  std::vector<double> & fullwave,
47  int fullwave_index,
48  double min_time,
49  double max_time,
50  glm::dvec3& beamOrigin,
51  glm::dvec3& beamDir,
52  double gpstime
53  );
57  void applySettings(std::shared_ptr<ScannerSettings> & settings) override;
61  void simulatePulse(
62  thread_pool & pool,
63  glm::dvec3 absoluteBeamOrigin,
64  Rotation absoluteBeamAttitude,
65  int state_currentPulseNumber,
66  double currentGpsTime
67  ) override;
68 
69  // *** GETTERS and SETTERS *** //
70  // ***************************** //
78  void setOutputFilePath(
79  std::string path,
80  std::string fname="fullwave.txt",
81  bool computeWaveform=true
82  );
83 };
std::shared_ptr< SyncFileWriter > fw_sfw
Synchronous file writer used to handle output.
Definition: FullWaveformPulseDetector.h:21
void shutdown() override
Definition: FullWaveformPulseDetector.cpp:93
Concrete implementation of abstract detector to compute full waveform pulses.
Definition: FullWaveformPulseDetector.h:14
-
Definition: Rotation.h:81
+
Definition: Rotation.h:80
FullWaveformPulseDetector(std::shared_ptr< Scanner > scanner, double accuracy_m, double range_min)
Base constructor for full waveform pulse detector.
Definition: FullWaveformPulseDetector.h:31
Base abstract class for detectors.
Definition: AbstractDetector.h:22
Class representing a thread pool to deal with multi threading tasks.
Definition: ThreadPool.h:14
diff --git a/doc/html/d4/d6d/ConicBeamDeflector_8h_source.html b/doc/html/d4/d6d/ConicBeamDeflector_8h_source.html index 223e93a1f..50267ae63 100644 --- a/doc/html/d4/d6d/ConicBeamDeflector_8h_source.html +++ b/doc/html/d4/d6d/ConicBeamDeflector_8h_source.html @@ -92,7 +92,7 @@
1 #pragma once
2 
3 #include "AbstractBeamDeflector.h"
8 
9 public:
10  // *** ATTRIBUTES *** //
11  // ******************** /7
16 
17  // *** CONSTRUCTION / DESTRUCTION *** //
18  // ************************************ //
25  double scanAngleMax_rad,
26  double scanFreqMax_Hz,
27  double scanFreqMin_Hz
28  ) :
29  AbstractBeamDeflector(scanAngleMax_rad, scanFreqMax_Hz, scanFreqMin_Hz)
30  {}
31  std::shared_ptr<AbstractBeamDeflector> clone() override;
32  void _clone(std::shared_ptr<AbstractBeamDeflector> abd) override;
33 
34 
35  // *** M E T H O D S *** //
36  // *********************** //
40  void applySettings(std::shared_ptr<ScannerSettings> settings) override;
44  void doSimStep() override;
45 };
Rotation r1
Rotation used to create the radius of the cone.
Definition: ConicBeamDeflector.h:15
Base abstract class for beam deflectors.
Definition: AbstractBeamDeflector.h:10
-
Definition: Rotation.h:81
+
Definition: Rotation.h:80
void doSimStep() override
Definition: ConicBeamDeflector.cpp:39
ConicBeamDeflector(double scanAngleMax_rad, double scanFreqMax_Hz, double scanFreqMin_Hz)
Constructor for conic beam deflector.
Definition: ConicBeamDeflector.h:24
Class representing a conic beam deflector.
Definition: ConicBeamDeflector.h:7
diff --git a/doc/html/d5/d6c/SurveyCopyTest_8h_source.html b/doc/html/d5/d6c/SurveyCopyTest_8h_source.html index 54a655b84..b9fa1776c 100644 --- a/doc/html/d5/d6c/SurveyCopyTest_8h_source.html +++ b/doc/html/d5/d6c/SurveyCopyTest_8h_source.html @@ -91,19 +91,19 @@
1 #pragma once
2 
3 #include "BaseTest.h"
4 #include <Survey.h>
5 #include <OscillatingMirrorBeamDeflector.h>
6 #include <HelicopterPlatform.h>
7 #include <FullWaveformPulseDetector.h>
8 
9 namespace HeliosTests{
16 class SurveyCopyTest : public BaseTest{
17 public:
18  // *** CONSTRUCTOR *** //
19  // ********************* //
23  SurveyCopyTest() : BaseTest("Survey copy test"){}
24 
25  // *** R U N *** //
26  // *************** //
30  bool run() override;
31 };
32 
34  // Build base Survey
35  std::shared_ptr<Survey> survey = std::make_shared<Survey>();
36  survey->name = "MySurvey";
37  survey->numRuns = 1;
38  survey->simSpeedFactor = 1;
39  std::list<int> pulseFreqs;
40  pulseFreqs.push_back(100);
41  pulseFreqs.push_back(30);
42  pulseFreqs.push_back(70);
43  survey->scanner = std::make_shared<Scanner>(
44  0.1,
45  glm::dvec3(2.0, 3.0, 0.0),
46  Rotation(0.0, 0.0, 0.0, 0.0, true),
47  pulseFreqs,
48  4.0,
49  "MyScanner",
50  80.5,
51  3.0,
52  0.9,
53  0.7,
54  0.8,
55  100,
56  false,
57  false,
58  false,
59  true
60  );
61  survey->scanner->scannerHead = std::make_shared<ScannerHead>(
62  glm::dvec3(0.4, 0.7, 0.1), 0.067
63  );
64  survey->scanner->beamDeflector =
65  std::make_shared<OscillatingMirrorBeamDeflector>(
66  3.141592,
67  1400.5,
68  70.8,
69  1
70  );
71  survey->scanner->platform = std::make_shared<HelicopterPlatform>();
72  survey->scanner->detector = std::make_shared<FullWaveformPulseDetector>(
73  survey->scanner,
74  1.5,
75  0.1
76  );
77  survey->legs.push_back(std::make_shared<Leg>());
78  survey->legs[0]->mPlatformSettings = std::make_shared<PlatformSettings>();
79  survey->legs[0]->mPlatformSettings->onGround = false;
80  survey->scanner->platform->scene = std::make_shared<Scene>();
81  std::shared_ptr<Scene> baseScene = survey->scanner->platform->scene;
82  baseScene->primitives.push_back(new Triangle(
83  Vertex(), Vertex(), Vertex()
84  ));
85  baseScene->primitives[0]->part = std::make_shared<ScenePart>();
86  baseScene->primitives[0]->part->mPrimitives.push_back(
87  baseScene->primitives[0]);
88  baseScene->primitives[0]->part->onRayIntersectionMode = "TRANSMITTIVE";
89  baseScene->primitives.push_back(new DetailedVoxel(
90  glm::dvec3(0.0, 0.0, 0.5),
91  2.15,
92  std::vector<int>({1,2}),
93  std::vector<double>({0.1, 0.2, 0.3})
94  ));
95  baseScene->primitives[1]->material = std::make_shared<Material>();
96  baseScene->primitives[1]->material->ka[0] = 1.1;
97  baseScene->primitives[1]->material->ks[1] = 1.2;
98 
99  // Copy base Survey
100  std::shared_ptr<Survey> copy = std::make_shared<Survey>(*survey);
101 
102  // Do some changes on copy
103  copy->name = "CopiedSurvey";
104  copy->numRuns = 0;
105  copy->scanner->name = "CopiedScanner";
106  Rotation &copyMRA =
107  copy->scanner->scannerHead->getMountRelativeAttitudeByReference();
108  copyMRA.setQ3(copyMRA.getQ3() + 0.1);
109  copy->scanner->beamDeflector->cfg_device_scanFreqMax_Hz += 1.0;
110  copy->scanner->platform->cfg_device_relativeMountPosition.x += 0.01;
111  HelicopterPlatform *hp =
112  ((HelicopterPlatform *)copy->scanner->platform.get());
113  glm::dvec3 & speedXy = hp->getSpeedXyByReference();
114  speedXy.x += 0.1;
115  Rotation & r = hp->getRotationByReference();
116  r.setQ2(r.getQ2()+0.1);
117  copy->scanner->FWF_settings.minEchoWidth += 0.001;
118  copy->legs[0]->mPlatformSettings->onGround = true;
119  std::shared_ptr<Scene> copyScene = copy->scanner->platform->scene;
120  copyScene->primitives[0]->getVertices()[0].pos.x += 0.1;
121  copyScene->primitives[0]->part->onRayIntersectionArgument += 0.034;
122  copyScene->primitives[1]->material->ks[1] += 0.1;
123  DetailedVoxel *copyDv = (DetailedVoxel *) copyScene->primitives[1];
124  (*copyDv)[1] += 0.1;
125 
126  // Validate copy
127  if(copy->name == survey->name) return false;
128  if(copy->numRuns == survey->numRuns) return false;
129  if(copy->simSpeedFactor != survey->simSpeedFactor) return false;
130  if(copy->scanner->name == survey->scanner->name) return false;
131  if(copy->scanner->numTimeBins!=survey->scanner->numTimeBins) return false;
132  if(copy->scanner->isCalcEchowidth() != survey->scanner->isCalcEchowidth())
133  return false;
134  if(copy->scanner->FWF_settings.minEchoWidth ==
135  survey->scanner->FWF_settings.minEchoWidth)
136  return false;
137  if(copy->scanner->FWF_settings.apertureDiameter !=
138  survey->scanner->FWF_settings.apertureDiameter)
139  return false;
140  if(copy->scanner->scannerHead->getRotatePerSecMax() !=
141  survey->scanner->scannerHead->getRotatePerSecMax())
142  return false;
143  Rotation &baseMRA =
144  survey->scanner->scannerHead->getMountRelativeAttitudeByReference();
145  if(copyMRA.getQ0()!=baseMRA.getQ0() || copyMRA.getQ3()==baseMRA.getQ3())
146  return false;
147  if(copy->scanner->beamDeflector->cfg_device_scanFreqMin_Hz !=
148  survey->scanner->beamDeflector->cfg_device_scanFreqMin_Hz)
149  return false;
150  if(copy->scanner->beamDeflector->cfg_device_scanFreqMax_Hz ==
151  survey->scanner->beamDeflector->cfg_device_scanFreqMax_Hz)
152  return false;
153  if(copy->scanner->platform->cfg_device_relativeMountPosition.x ==
154  survey->scanner->platform->cfg_device_relativeMountPosition.x)
155  return false;
156  if(copy->scanner->platform->cfg_device_relativeMountPosition.y !=
157  survey->scanner->platform->cfg_device_relativeMountPosition.y)
158  return false;
159  HelicopterPlatform *copyHp =
160  (HelicopterPlatform *) copy->scanner->platform.get();
161  HelicopterPlatform *baseHp =
162  (HelicopterPlatform *) survey->scanner->platform.get();
163  glm::dvec3 &copySpeedXy = copyHp->getSpeedXyByReference();
164  glm::dvec3 &baseSpeedXy = baseHp->getSpeedXyByReference();
165  if(copySpeedXy.x == baseSpeedXy.x) return false;
166  if(copySpeedXy.y != baseSpeedXy.y) return false;
167  Rotation &copyRot = copyHp->getRotationByReference();
168  Rotation &baseRot = baseHp->getRotationByReference();
169  if(copyRot.getQ1() != baseRot.getQ1()) return false;
170  if(copyRot.getQ2() == baseRot.getQ2()) return false;
171  if(copy->legs[0]->mPlatformSettings->onGround ==
172  survey->legs[0]->mPlatformSettings->onGround)
173  return false;
174  if(copy->legs[0]->mPlatformSettings->stopAndTurn !=
175  survey->legs[0]->mPlatformSettings->stopAndTurn)
176  return false;
177  if(copyScene->primitives[0]->getVertices()[0].pos.x ==
178  baseScene->primitives[0]->getVertices()[0].pos.x)
179  return false;
180  if(copyScene->primitives[0]->getVertices()[0].pos.y !=
181  baseScene->primitives[0]->getVertices()[0].pos.y)
182  return false;
183  if(copyScene->primitives[0]->part->onRayIntersectionArgument ==
184  baseScene->primitives[0]->part->onRayIntersectionArgument)
185  return false;
186  if(copyScene->primitives[0]->part->onRayIntersectionMode !=
187  baseScene->primitives[0]->part->onRayIntersectionMode)
188  return false;
189  if(copyScene->primitives[1]->material->ka[0] !=
190  baseScene->primitives[1]->material->ka[0])
191  return false;
192  if(copyScene->primitives[1]->material->ks[1] ==
193  baseScene->primitives[1]->material->ks[1])
194  return false;
195  DetailedVoxel *baseDv = (DetailedVoxel *) baseScene->primitives[1];
196  copyDv = (DetailedVoxel *) copyScene->primitives[1];
197  if((*baseDv)[0] != (*copyDv)[0]) return false;
198  if((*baseDv)[1] == (*copyDv)[1]) return false;
199 
200  return true;
201 }
202 
203 }
Test survey copy.
Definition: SurveyCopyTest.h:16
-
Definition: Rotation.h:81
-
double getQ0()
Get the scalar coordinate of the quaternion.
Definition: Rotation.h:116
+
Definition: Rotation.h:80
+
double getQ0()
Get the scalar coordinate of the quaternion.
Definition: Rotation.h:115
glm::dvec3 & getSpeedXyByReference()
Obtain xy speed vector by reference.
Definition: HelicopterPlatform.h:231
-
double getQ3()
Get the third coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:138
+
double getQ3()
Get the third coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:137
BaseTest class.
Definition: BaseTest.h:19
Class which extends Voxel to support AMAPVox format with extra features.
Definition: DetailedVoxel.h:12
SurveyCopyTest()
Survey copy test constructor.
Definition: SurveyCopyTest.h:23
bool run() override
Definition: SurveyCopyTest.h:33
-
double getQ1()
Get the first coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:123
+
double getQ1()
Get the first coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:122
Class representing triangle primitive.
Definition: Triangle.h:13
Rotation & getRotationByReference()
Obtain rotation assistance r by reference.
Definition: HelicopterPlatform.h:236
Definition: BaseTest.h:6
-
double getQ2()
Get the second coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:131
+
double getQ2()
Get the second coordinate of the vectorial part of the quaternion.
Definition: Rotation.h:130
Class representing a helicopter platform.
Definition: HelicopterPlatform.h:12
Class representing a vertex.
Definition: Vertex.h:14
diff --git a/doc/html/d5/d7f/Voxel_8h_source.html b/doc/html/d5/d7f/Voxel_8h_source.html index f7b28b3b8..53b192056 100644 --- a/doc/html/d5/d7f/Voxel_8h_source.html +++ b/doc/html/d5/d7f/Voxel_8h_source.html @@ -96,7 +96,7 @@
Voxel()=default
Default voxel constructor.
AABB * bbox
Axis aligned bounding box containing the voxel.
Definition: Voxel.h:58
Vertex * getVertices() override
Definition: Voxel.cpp:120
-
Definition: Rotation.h:81
+
Definition: Rotation.h:80
Vertex v
Vertex representing the voxel center.
Definition: Voxel.h:33
Primitive * clone() override
Definition: Voxel.cpp:17
double getRayIntersectionDistance(const glm::dvec3 &rayOrigin, const glm::dvec3 &rayDir) override
Definition: Voxel.cpp:113
diff --git a/doc/html/d5/dcb/classRotation.html b/doc/html/d5/dcb/classRotation.html index 7828956c3..9fa0961ec 100644 --- a/doc/html/d5/dcb/classRotation.html +++ b/doc/html/d5/dcb/classRotation.html @@ -96,6 +96,8 @@
Rotation Class Reference
+ +

#include <Rotation.h>

@@ -187,7 +189,24 @@

Public Member Functions

std::ostream & operator<< (std::ostream &out, Rotation &r)
 
-

Constructor & Destructor Documentation

+

Detailed Description

+

This class implements rotations in a three-dimensional space.

+

Rotations can be represented by several different mathematical entities (matrices, axe and angle, Cardan or Euler angles, quaternions). This class presents an higher level abstraction, more user-oriented and hiding this implementation details. Well, for the curious, we use quaternions for the internal representation. The user can build a rotation from any of these representations, and any of these representations can be retrieved from a Rotation instance (see the various constructors and getters). In addition, a rotation can also be built implicitly from a set of vectors and their image.

+

This implies that this class can be used to convert from one representation to another one. For example, converting a rotation matrix into a set of Cardan angles from can be done using the following single line of code:

+
+double[] angles = new Rotation(matrix, 1.0e-10).getAngles(RotationOrder.XYZ);
+

Focus is oriented on what a rotation do rather than on its underlying representation. Once it has been built, and regardless of its internal representation, a rotation is an operator which basically transforms three dimensional vectors into other three dimensional vectors. Depending on the application, the meaning of these vectors may vary and the semantics of the rotation also.

+

For example in an spacecraft attitude simulation tool, users will often consider the vectors are fixed (say the Earth direction for example) and the frames change. The rotation transforms the coordinates of the vector in inertial frame into the coordinates of the same vector in satellite frame. In this case, the rotation implicitly defines the relation between the two frames.

+

Another example could be a telescope control application, where the rotation would transform the sighting direction at rest into the desired observing direction when the telescope is pointed towards an object of interest. In this case the rotation transforms the direction at rest in a topocentric frame into the sighting direction in the same topocentric frame. This implies in this case the frame is fixed and the vector moves.

+

In many case, both approaches will be combined. In our telescope example, we will probably also need to transform the observing direction in the topocentric frame into the observing direction in inertial frame taking into account the observatory location and the Earth rotation, which would essentially be an application of the first approach.

+

These examples show that a rotation is what the user wants it to be. This class does not push the user towards one specific definition and hence does not provide methods like projectVectorIntoDestinationFrame or computeTransformedDirection. It provides simpler and more generic methods: applyTo(Vector3D) and applyInverseTo(Vector3D).

+

Since a rotation is basically a vectorial operator, several rotations can be composed together and the composite operation r = r1 o r2 (which means that for each vector u, r(u) = r1(r2(u))) is also a rotation. Hence we can consider that in addition to vectors, a rotation can be applied to other rotations as well (or to itself). With our previous notations, we would say we can apply r1 to r2 and the result we get is r = r1 o r2. For this purpose, the class provides the methods: applyTo(Rotation) and applyInverseTo(Rotation).

+

Rotations are guaranteed to be immutable objects.

+
See also
Vector3D
+
+RotationOrder
+
Since
1.2
+

Constructor & Destructor Documentation

◆ Rotation() [1/4]

diff --git a/doc/html/d5/df8/PyBeamDeflectorWrapper_8h_source.html b/doc/html/d5/df8/PyBeamDeflectorWrapper_8h_source.html index 42f6e0d24..ba0aee046 100644 --- a/doc/html/d5/df8/PyBeamDeflectorWrapper_8h_source.html +++ b/doc/html/d5/df8/PyBeamDeflectorWrapper_8h_source.html @@ -91,7 +91,7 @@
1 #pragma once
2 
3 #ifdef PYTHON_BINDING
4 
5 #include <AbstractBeamDeflector.h>
6 #include <memory>
7 
8 namespace pyhelios{
9 
18 public:
19  // *** ATTRIBUTES *** //
20  // ******************** //
21  AbstractBeamDeflector &beamDeflector;
22 
23  // *** CONSTRUCTION *** //
24  // ********************** //
26  std::shared_ptr<AbstractBeamDeflector> beamDeflector
27  ) : beamDeflector(*beamDeflector) {}
28  virtual ~PyBeamDeflectorWrapper(){}
29 
30  // *** GETTERS and SETTERS *** //
31  // ***************************** //
32  inline double getScanFreqMax()
33  {return beamDeflector.cfg_device_scanFreqMax_Hz;}
34  inline void setScanFreqMax(double scanFreqMax_Hz)
35  {beamDeflector.cfg_device_scanFreqMax_Hz = scanFreqMax_Hz;}
36  inline double getScanFreqMin()
37  {return beamDeflector.cfg_device_scanFreqMin_Hz;}
38  inline void setScanFreqMin(double scanFreqMin_Hz)
39  {beamDeflector.cfg_device_scanFreqMin_Hz = scanFreqMin_Hz;}
40  inline double getScanAngleMax()
41  {return beamDeflector.cfg_device_scanAngleMax_rad;}
42  inline void setScanAngleMax(double scanAngleMax)
43  {beamDeflector.cfg_device_scanAngleMax_rad = scanAngleMax;}
44  inline double getScanFreq()
45  {return beamDeflector.cfg_device_scanFreqMin_Hz;}
46  inline void setScanFreq(double scanFreq)
47  {beamDeflector.cfg_device_scanFreqMin_Hz = scanFreq;}
48  inline double getScanAngle()
49  {return beamDeflector.cfg_setting_scanAngle_rad;}
50  inline void setScanAngle(double scanAngle)
51  {beamDeflector.cfg_setting_scanAngle_rad = scanAngle;}
52  inline double getVerticalAngleMin()
53  {return beamDeflector.cfg_setting_verticalAngleMin_rad;}
54  inline void setVerticalAngleMin(double verticalAngleMin)
55  {beamDeflector.cfg_setting_verticalAngleMin_rad = verticalAngleMin;}
56  inline double getVerticalAngleMax()
57  {return beamDeflector.cfg_setting_verticalAngleMax_rad;}
58  inline void setVerticalAngleMax(double verticalAngleMax)
59  {beamDeflector.cfg_setting_verticalAngleMax_rad = verticalAngleMax;}
60  inline double getCurrentBeamAngle()
61  {return beamDeflector.state_currentBeamAngle_rad;}
62  inline void setCurrentBeamAngle(double currentBeamAngle)
63  {beamDeflector.state_currentBeamAngle_rad = currentBeamAngle;}
64  inline double getAngleDiff()
65  {return beamDeflector.state_angleDiff_rad;}
66  inline void setAngleDiff(double angleDiff)
67  {beamDeflector.state_angleDiff_rad = angleDiff;}
68  inline double getCachedAngleBetweenPulses()
69  {return beamDeflector.cached_angleBetweenPulses_rad;}
70  inline void setCachedAngleBetweenPulses(double angleBetweenPulses)
71  {beamDeflector.cached_angleBetweenPulses_rad = angleBetweenPulses;}
72  inline Rotation& getEmitterRelativeAttitude()
73  {return beamDeflector.getEmitterRelativeAttitudeByReference();}
74 };
75 
76 }
77 
78 #endif
Base abstract class for beam deflectors.
Definition: AbstractBeamDeflector.h:10
-
Definition: Rotation.h:81
+
Definition: Rotation.h:80
Definition: PyAABBWrapper.h:7
Wrapper for AbstractBeamDeflector class.
Definition: PyBeamDeflectorWrapper.h:17
diff --git a/doc/html/d6/d03/ScenePart_8h_source.html b/doc/html/d6/d03/ScenePart_8h_source.html index 4ccda5c67..73b1ed7c6 100644 --- a/doc/html/d6/d03/ScenePart_8h_source.html +++ b/doc/html/d6/d03/ScenePart_8h_source.html @@ -94,7 +94,7 @@
std::vector< Vertex * > getAllVertices()
Obtain all vertices in the scene part.
Definition: ScenePart.cpp:80
Class representing a .obj loaded file.
Definition: WavefrontObj.h:15
std::vector< Primitive * > mPrimitives
Vector of pointers to primitives used by this scene part.
Definition: ScenePart.h:40
-
Definition: Rotation.h:81
+
Definition: Rotation.h:80
void addObj(WavefrontObj *obj)
Add the primitives of a WavefrontObj to the ScenePart.
Definition: ScenePart.cpp:62
Rotation mRotation
Specify the rotation for the scene part.
Definition: ScenePart.h:85
std::shared_ptr< LadLut > ladlut
Look-up table for leaf angle distribution.
Definition: ScenePart.h:76
diff --git a/doc/html/d6/dd1/classvisualhelios_1_1VHDynObjectXYZRGBAdapter.html b/doc/html/d6/dd1/classvisualhelios_1_1VHDynObjectXYZRGBAdapter.html index 0a088fff9..8f10fe3a6 100644 --- a/doc/html/d6/dd1/classvisualhelios_1_1VHDynObjectXYZRGBAdapter.html +++ b/doc/html/d6/dd1/classvisualhelios_1_1VHDynObjectXYZRGBAdapter.html @@ -230,7 +230,7 @@

-
See also
visualhelios::VHDynObjectAdapter:::buildPolymesh
+
See also
visualhelios::VHDynObjectAdapter::buildPolymesh

Implements visualhelios::VHDynObjectAdapter.

diff --git a/doc/html/d6/dd5/HelicopterPlatform_8h_source.html b/doc/html/d6/dd5/HelicopterPlatform_8h_source.html index b0b2c12c4..e4855f03d 100644 --- a/doc/html/d6/dd5/HelicopterPlatform_8h_source.html +++ b/doc/html/d6/dd5/HelicopterPlatform_8h_source.html @@ -107,7 +107,7 @@
double cfg_pitch_speed
Pitch rotation speed (units per second)
Definition: HelicopterPlatform.h:64
bool cache_turning
Flag specifying if helicopter is currently turning (true) or not (false)
Definition: HelicopterPlatform.h:163
double yaw
Helicopter yaw angle.
Definition: HelicopterPlatform.h:36
-
Definition: Rotation.h:81
+
Definition: Rotation.h:80
void handleRoute(int simFrequency_hz)
Determine remaining iterations and start turning mode if necessary.
Definition: HelicopterPlatform.cpp:366
glm::dvec3 speed_xy
Helicopter speed vector over xy plane.
Definition: HelicopterPlatform.h:136
double ef_xy_max
Max engine force over XY plane.
Definition: HelicopterPlatform.h:32
diff --git a/doc/html/d7/d34/AbstractBeamDeflector_8h_source.html b/doc/html/d7/d34/AbstractBeamDeflector_8h_source.html index 4205ba7d6..d526d99aa 100644 --- a/doc/html/d7/d34/AbstractBeamDeflector_8h_source.html +++ b/doc/html/d7/d34/AbstractBeamDeflector_8h_source.html @@ -95,7 +95,7 @@
double state_currentBeamAngle_rad
Current beam angle (radians)
Definition: AbstractBeamDeflector.h:50
double cfg_setting_verticalAngleMax_rad
Maximum vertical scanning angle (radians)
Definition: AbstractBeamDeflector.h:44
double cfg_device_scanAngleMax_rad
Maximum scanning angle (radians)
Definition: AbstractBeamDeflector.h:26
-
Definition: Rotation.h:81
+
Definition: Rotation.h:80
virtual bool lastPulseLeftDevice()
Check if last pulse left device (true) or not (false)
Definition: AbstractBeamDeflector.cpp:75
double state_angleDiff_rad
Angle differential (radians)
Definition: AbstractBeamDeflector.h:54
Rotation getEmitterRelativeAttitude()
Get the relative emitter attitude.
Definition: AbstractBeamDeflector.cpp:56
diff --git a/doc/html/d7/d3f/RotateFilter_8h_source.html b/doc/html/d7/d3f/RotateFilter_8h_source.html index ebd9bf0d5..680185f39 100644 --- a/doc/html/d7/d3f/RotateFilter_8h_source.html +++ b/doc/html/d7/d3f/RotateFilter_8h_source.html @@ -90,7 +90,7 @@
RotateFilter.h

-
1 #pragma once
2 
3 #include "AbstractGeometryFilter.h"
4 
9 
10 public:
11  // *** ATTRIBUTES *** //
12  // ******************** //
17  bool useLocalRotation = false;
22 
23  // *** CONSTRUCTION / DESTRUCTION *** //
24  // ************************************ //
30 
31  // *** R U N *** //
32  // *************** //
36  ScenePart* run();
37 };
Definition: Rotation.h:81
+
1 #pragma once
2 
3 #include "AbstractGeometryFilter.h"
4 
9 
10 public:
11  // *** ATTRIBUTES *** //
12  // ******************** //
17  bool useLocalRotation = false;
22 
23  // *** CONSTRUCTION / DESTRUCTION *** //
24  // ************************************ //
30 
31  // *** R U N *** //
32  // *************** //
36  ScenePart* run();
37 };
Definition: Rotation.h:80
bool useLocalRotation
Specify if use local rotation (true) or rotation from parsed parameters (false, by default) ...
Definition: RotateFilter.h:17
RotateFilter(ScenePart *parts)
Constructor for rotate transform filter.
Definition: RotateFilter.h:29
Rotation localRotation
Local rotation specification.
Definition: RotateFilter.h:21
diff --git a/doc/html/d7/d5d/Primitive_8h_source.html b/doc/html/d7/d5d/Primitive_8h_source.html index fd8b41691..c5436000a 100644 --- a/doc/html/d7/d5d/Primitive_8h_source.html +++ b/doc/html/d7/d5d/Primitive_8h_source.html @@ -92,7 +92,7 @@
1 #pragma once
2 
3 #include <vector>
4 #include <boost/serialization/base_object.hpp>
5 #include <boost/serialization/shared_ptr.hpp>
6 #include <glm/glm.hpp>
7 
8 #include "Material.h"
9 #include "ScenePart.h"
10 #include <NoiseSource.h>
11 #include <IntersectionHandlingResult.h>
12 #include <util/HeliosException.h>
13 
14 class AABB;
15 class Vertex;
16 
20 class Primitive {
21  // *** SERIALIZATION *** //
22  // *********************** //
23  friend class boost::serialization::access;
24  template<class Archive>
25  void serialize(Archive &ar, const unsigned int version) {
26  ar & part;
27  ar & material;
28  }
29 
30 public:
31  // *** ATTRIBUTES *** //
32  // ******************** //
37  std::shared_ptr<ScenePart> part = nullptr;
43  std::shared_ptr<Material> material = nullptr;
44 
45  // *** CONSTRUCTION / DESTRUCTION *** //
46  // ************************************ //
47  virtual ~Primitive(){}
48  virtual Primitive* clone() = 0;
49  virtual void _clone(Primitive *p);
50 
51  // *** M E T H O D S *** //
52  // *********************** //
57  virtual AABB* getAABB() = 0;
62  virtual glm::dvec3 getCentroid() = 0;
70  virtual double getIncidenceAngle_rad(
71  const glm::dvec3& rayOrigin,
72  const glm::dvec3& rayDir,
73  const glm::dvec3& intersectionPoint
74  ) = 0;
81  virtual std::vector<double> getRayIntersection(
82  const glm::dvec3& rayOrigin, const glm::dvec3& rayDir) = 0;
90  virtual double getRayIntersectionDistance(
91  const glm::dvec3& rayOrigin, const glm::dvec3& rayDir) = 0;
103  virtual void onFinishLoading(NoiseSource<double> &uniformNoiseSource) {}
104 
111  inline virtual size_t getNumVertices() {return 0;}
117  virtual Vertex* getVertices() = 0;
118 
125  inline virtual size_t getNumFullVertices() {return getNumVertices();};
138  virtual Vertex* getFullVertices() {return getVertices();};
139 
167  inline virtual double getGroundZOffset() {return 0;}
168 
173  virtual void update() = 0;
174 
175  // *** RAY INTERSECTION HANDLING *** //
176  // *********************************** //
188  virtual inline bool canHandleIntersections(){return false;}
210  NoiseSource<double> &uniformNoiseSource,
211  glm::dvec3 &rayDirection,
212  glm::dvec3 const &insideIntersectionPoint,
213  glm::dvec3 const &outsideIntersectionPoint,
214  double rayIntensity
215  );
216 
217  // *** TRANSFORMATIONS *** //
218  // ************************* //
223  virtual void rotate(Rotation &r);
228  virtual void scale(double const factor);
233  virtual void translate(glm::dvec3 const &shift);
234 
235  // *** S I G M A *** //
236  // ******************* //
243  virtual bool canComputeSigmaWithLadLut() {return false;}
255  virtual double computeSigmaWithLadLut(glm::dvec3 const &direction)
256  {throw HeliosException("Primitive cannot compute sigma with LadLut");}
257 
258  // *** STREAM OPERATORS *** //
259  // ************************** //
263  friend std::ostream& operator<< (std::ostream& out, Primitive &p);
264 };
virtual double computeSigmaWithLadLut(glm::dvec3 const &direction)
Compute sigma using LadLut.
Definition: Primitive.h:255
friend std::ostream & operator<<(std::ostream &out, Primitive &p)
Output stream operator << overloading.
Definition: Primitive.cpp:24
-
Definition: Rotation.h:81
+
Definition: Rotation.h:80
virtual AABB * getAABB()=0
Obtain the axis aligned bounding box containing the primitive.
std::shared_ptr< Material > material
Shared pointer to the material defining certain properties such as reflectance, specularity, ...
Definition: Primitive.h:43
Base class for Helios exceptions.
Definition: HeliosException.h:12
diff --git a/doc/html/d8/d9e/AbstractPulseRunnable_8h_source.html b/doc/html/d8/d9e/AbstractPulseRunnable_8h_source.html index 197bbf2f3..ba83db44a 100644 --- a/doc/html/d8/d9e/AbstractPulseRunnable_8h_source.html +++ b/doc/html/d8/d9e/AbstractPulseRunnable_8h_source.html @@ -93,7 +93,7 @@
1 #pragma once
2 
3 #include "AbstractDetector.h"
4 #include <noise/RandomnessGenerator.h>
5 class Measurement;
6 #include "LasSpecification.h"
7 #include <mutex>
8 
9 // ############## BEGIN Static variables ###############
13 static const double speedOfLight_mPerSec = 299792458;
14 
18 static const double cfg_speedOfLight_mPerNanosec = 0.299792458;
19 
23 static const double speedOfLight_mPerPicosec = 0.000299792458;
24 // ############## END Static variables ###############
25 
30 public:
31  // *** ATTRIBUTES *** //
32  // ******************** //
36  std::shared_ptr<AbstractDetector> detector = nullptr;
37 
41  glm::dvec3 absoluteBeamOrigin;
46 
54  double currentGpsTime; // In milliseconds
55 
60  bool writeGround = true;
61 
62  // *** CONSTRUCTION / DESTRUCTION *** //
63  // ************************************ //
73  std::shared_ptr<AbstractDetector> detector,
74  glm::dvec3 absoluteBeamOrigin,
75  Rotation absoluteBeamAttitude,
76  int pulseNumber,
77  long gpsTime
78  ){
79  this->detector = detector;
80  this->absoluteBeamAttitude = absoluteBeamAttitude;
81  this->absoluteBeamOrigin = absoluteBeamOrigin;
82  this->currentPulseNum = pulseNumber;
83  this->currentGpsTime = gpsTime;
84  }
85 
86  // *** M E T H O D S *** //
87  // *********************** //
100  double calcCrossSection(double f, double Alf, double theta);
110  double phongBDRF(
111  double incidenceAngle,
112  double targetSpecularity,
113  double targetSpecularExponent
114  );
127  inline double calcAtmosphericFactor(double targetRange);
137  double calcReceivedPower(
138  double emittedPower,
139  double targetRange,
140  double incidenceAngle,
141  double targetReflectivity,
142  double targetSpecularity,
143  double targetSpecularExponent,
144  double targetArea
145  );
159  double calcReceivedPower(
160  double emittedPower,
161  double targetRange,
162  double sigma
163  );
172  static inline double _calcReceivedPower(
173  double Pt,
174  double Dr2,
175  double R,
176  double Bt2,
177  double etaSys,
178  double etaAtm,
179  double sigma
180  );
194  void capturePoint(
195  Measurement & m,
197  std::vector<Measurement> *allMeasurements,
198  std::mutex *allMeasurementsMutex,
199  std::vector<Measurement> *cycleMeasurements,
200  std::mutex *cycleMeasurementsMutex
201  );
214  double &distance,
215  glm::dvec3 &beamOrigin,
216  glm::dvec3 &beamDirection
217  );
218 
223  virtual void operator()() = 0;
224 };
double calcAtmosphericFactor(double targetRange)
Compute atmospheric factor , understood as the energy left after attenuation by air particles in rang...
Definition: AbstractPulseRunnable.cpp:32
bool writeGround
Flag to specify if ground points must be captured (true) or not (false)
Definition: AbstractPulseRunnable.h:60
-
Definition: Rotation.h:81
+
Definition: Rotation.h:80
static double _calcReceivedPower(double Pt, double Dr2, double R, double Bt2, double etaSys, double etaAtm, double sigma)
Compute received power .
Definition: AbstractPulseRunnable.cpp:81
Class representing a measurement.
Definition: Measurement.h:12
Base abstract class for pulse runnables.
Definition: AbstractPulseRunnable.h:29
diff --git a/doc/html/d9/d65/FullWaveformPulseRunnable_8h_source.html b/doc/html/d9/d65/FullWaveformPulseRunnable_8h_source.html index a27b779aa..94e316656 100644 --- a/doc/html/d9/d65/FullWaveformPulseRunnable_8h_source.html +++ b/doc/html/d9/d65/FullWaveformPulseRunnable_8h_source.html @@ -94,7 +94,7 @@
std::mutex * allMeasurementsMutex
Mutex to handle concurrent access to vector of all measurements.
Definition: FullWaveformPulseRunnable.h:43
bool calcEchowidth
Flag to specify if calc echo width (true) or not (false)
Definition: FullWaveformPulseRunnable.h:61
-
Definition: Rotation.h:81
+
Definition: Rotation.h:80
std::mutex * cycleMeasurementsMutex
Mutex to handle concurrent access to vector of current cycle measurements.
Definition: FullWaveformPulseRunnable.h:53
void computeSubrays(Scene &scene, NoiseSource< double > &intersectionHandlingNoiseSource, std::map< double, double > &reflections, vector< RaySceneIntersection > &intersects)
Perform ray casting to find intersections.
Definition: FullWaveformPulseRunnable.cpp:73
double calcIntensity(double incidenceAngle, double targetRange, double targetReflectivity, double targetSpecularity, double targetSpecularExponent, double targetArea, double radius)
Compute intensity.
Definition: FullWaveformPulseRunnable.cpp:553
diff --git a/doc/html/d9/dd0/Platform_8h_source.html b/doc/html/d9/dd0/Platform_8h_source.html index 1366a8583..207e974fd 100644 --- a/doc/html/d9/dd0/Platform_8h_source.html +++ b/doc/html/d9/dd0/Platform_8h_source.html @@ -106,7 +106,7 @@
glm::dvec3 cached_vectorToTarget_xy
Distance vector from current position to target over XY plane (z is always 0)
Definition: Platform.h:178
Base class for all assets.
Definition: Asset.h:10
std::shared_ptr< Scene > scene
Scene where the platform belongs to.
Definition: Platform.h:47
-
Definition: Rotation.h:81
+
Definition: Rotation.h:80
virtual void setAttitude(Rotation attitude)
Set platform attitude.
Definition: Platform.cpp:76
virtual void doSimStep(int simFrequency_hz)
Do corresponding computations for the platform at current simulation step.
Definition: Platform.h:270
glm::dvec3 position
Platform 3D position.
Definition: Platform.h:133
diff --git a/doc/html/da/d62/Scanner_8h_source.html b/doc/html/da/d62/Scanner_8h_source.html index d5ee48a38..f750a7287 100644 --- a/doc/html/da/d62/Scanner_8h_source.html +++ b/doc/html/da/d62/Scanner_8h_source.html @@ -103,7 +103,7 @@
int getPulseFreq_Hz()
Obtain the pulse frequency.
Definition: Scanner.h:509
std::shared_ptr< AbstractBeamDeflector > beamDeflector
Beam deflector composing the scanner.
Definition: Scanner.h:174
Base class for all assets.
Definition: Asset.h:10
-
Definition: Rotation.h:81
+
Definition: Rotation.h:80
void setFullWaveNoise(bool fullWaveNoise)
Set scanner full wave noise policy.
Definition: Scanner.h:761
Wrapper for NoiseSource abstract class.
Definition: PyNoiseSourceWrapper.h:16
double getBt2()
Obtain .
Definition: Scanner.h:679
diff --git a/doc/html/de/d3c/classvisualhelios_1_1VHDynObjectXYZAdapter.html b/doc/html/de/d3c/classvisualhelios_1_1VHDynObjectXYZAdapter.html index 4fa48008e..9a6320022 100644 --- a/doc/html/de/d3c/classvisualhelios_1_1VHDynObjectXYZAdapter.html +++ b/doc/html/de/d3c/classvisualhelios_1_1VHDynObjectXYZAdapter.html @@ -231,7 +231,7 @@

-
See also
visualhelios::VHDynObjectAdapter:::buildPolymesh
+
See also
visualhelios::VHDynObjectAdapter::buildPolymesh

Implements visualhelios::VHDynObjectAdapter.

diff --git a/src/maths/Rotation.h b/src/maths/Rotation.h index d36c95797..3110f32a4 100644 --- a/src/maths/Rotation.h +++ b/src/maths/Rotation.h @@ -1,5 +1,15 @@ #pragma once +#include "RotationOrder.h" + +#include +#include + +#if PYTHON_BINDING +#include +using pyhelios::PythonDVec3; +#endif + /** * This class implements rotations in a three-dimensional space. * @@ -67,17 +77,6 @@ * @see RotationOrder * @since 1.2 */ - -#include "RotationOrder.h" - -#include -#include - -#if PYTHON_BINDING -#include -using pyhelios::PythonDVec3; -#endif - class Rotation { // *** SERIALIZATION *** // // *********************** // @@ -150,6 +149,8 @@ class Rotation { void applyInverseTo(double* in, double* out); Rotation applyTo(Rotation r); Rotation applyInverseTo(Rotation r); + glm::dvec3 operator*(glm::dvec3 u) {return applyTo(u);} + Rotation operator*(Rotation r) {return applyTo(r);} /** * @brief Get the roll, pitch and yaw for the Rotation diff --git a/src/visualhelios/adapters/VHDynObjectXYZAdapter.h b/src/visualhelios/adapters/VHDynObjectXYZAdapter.h index 43b387774..b7c453304 100644 --- a/src/visualhelios/adapters/VHDynObjectXYZAdapter.h +++ b/src/visualhelios/adapters/VHDynObjectXYZAdapter.h @@ -39,7 +39,7 @@ class VHDynObjectXYZAdapter : public VHDynObjectAdapter{ // *** BUILDING *** // // ****************** // /** - * @see visualhelios::VHDynObjectAdapter:::buildPolymesh + * @see visualhelios::VHDynObjectAdapter::buildPolymesh */ void constructPolymesh() override; /** diff --git a/src/visualhelios/adapters/VHDynObjectXYZRGBAdapter.h b/src/visualhelios/adapters/VHDynObjectXYZRGBAdapter.h index 380d68ac8..c023b2078 100644 --- a/src/visualhelios/adapters/VHDynObjectXYZRGBAdapter.h +++ b/src/visualhelios/adapters/VHDynObjectXYZRGBAdapter.h @@ -37,7 +37,7 @@ class VHDynObjectXYZRGBAdapter : public VHDynObjectAdapter{ // *** BUILDING *** // // ****************** // /** - * @see visualhelios::VHDynObjectAdapter:::buildPolymesh + * @see visualhelios::VHDynObjectAdapter::buildPolymesh */ void constructPolymesh() override; /**