MineLink
 All Data Structures Functions Variables Pages
coords.h
1 #ifndef __COORDS_H__
2 #define __COORDS_H__
3 
4 #include <string>
5 #include <cstring>
6 #include <cstdio>
7 #include <cmath>
8 
9 //using std::ostream;
10 using std::string;
11 
12 namespace delphos{
13 
20 class Coordinates {
21 private:
22  float _x;
23  float _y;
24  float _z;
25 public:
26 
30  Coordinates(const float & x, const float & y, const float & z);
31 
35  Coordinates(const delphos::Coordinates & other);
36 
40  Coordinates();
41 
50  string ToString() const;
51 
57  const float X() const;
58 
64  const float Y() const;
65 
71  const float Z() const;
72 
86  bool InSlopeAngle(const double & vertical_angle_degrees,const double & max_z_diff, const delphos::Coordinates & other, const double tolerance = 0.001) const;
87 };
88 }
89 #endif
90 
An utility class to abstract coordinates so they can be used as map and set keys by means of string c...
Definition: coords.h:20
const float Z() const
Retrieves the component of the coordinates.
Definition: coords.cpp:30
const float X() const
Retrieves the component of the coordinates.
Definition: coords.cpp:20
Coordinates()
Creates coordinates with location .
Definition: coords.cpp:10
const float Y() const
Retrieves the component of the coordinates.
Definition: coords.cpp:25
bool InSlopeAngle(const double &vertical_angle_degrees, const double &max_z_diff, const delphos::Coordinates &other, const double tolerance=0.001) const
Checks whether the coordinates are within the precedence cone of another coordinates.
Definition: coords.cpp:35
string ToString() const
Converts the coordinates to its representation as a string.
Definition: coords.cpp:12