CoordinateTransform.hpp
Go to the documentation of this file.
1 
28 /*
29  * CoordinateTransform.hpp
30  *
31  * Created on: 17.04.2012
32  * Author: Thomas Wiemann
33  */
34 
35 #ifndef COORDINATETRANSFORM_HPP_
36 #define COORDINATETRANSFORM_HPP_
37 
38 #include "lvr2/io/PointBuffer.hpp"
39 
40 namespace lvr2
41 {
42 
44 
45  void convert(COORD_SYSTEM from, COORD_SYSTEM to, float* point);
46  void convert(COORD_SYSTEM from, COORD_SYSTEM to, PointBufferPtr &buffer);
47 
55  template<typename T>
57  {
58  CoordinateTransform(const unsigned char& _x = 0,
59  const unsigned char& _y = 1,
60  const unsigned char& _z = 2,
61  const T& _sx = 1.0,
62  const T& _sy = 1.0,
63  const T& _sz = 1.0) :
64  x(_x), y(_y), z(_z), sx(_sx), sy(_sy), sz(_sz) {}
65 
69  bool transforms()
70  {
71  return ((x != 0) || (y != 1) || (z != 2) || (sx != 1.0) || (sy != 1.0) || (sz != 1.0));
72  }
73 
75  unsigned char x;
76 
78  unsigned char y;
79 
81  unsigned char z;
82 
85  T sx;
86 
89  T sy;
90 
93  T sz;
94  };
95 
96 } // namespace lvr2
97 
98 #endif /* COORDINATETRANSFORM_HPP_ */
lvr2::CoordinateTransform::z
unsigned char z
Position of the z coordinate in the target system.
Definition: CoordinateTransform.hpp:81
lvr2::COORD_SYSTEM
COORD_SYSTEM
Definition: CoordinateTransform.hpp:43
lvr2::CoordinateTransform::CoordinateTransform
CoordinateTransform(const unsigned char &_x=0, const unsigned char &_y=1, const unsigned char &_z=2, const T &_sx=1.0, const T &_sy=1.0, const T &_sz=1.0)
Definition: CoordinateTransform.hpp:58
lvr2::SLAM6D
@ SLAM6D
Definition: CoordinateTransform.hpp:43
lvr2::PointBufferPtr
std::shared_ptr< PointBuffer > PointBufferPtr
Definition: PointBuffer.hpp:130
lvr2::CoordinateTransform::x
unsigned char x
Position of the x coordinate in the target system.
Definition: CoordinateTransform.hpp:75
lvr2::CoordinateTransform::sy
T sy
Definition: CoordinateTransform.hpp:89
lvr2::CoordinateTransform::y
unsigned char y
Position of the y coordinate in the target system.
Definition: CoordinateTransform.hpp:78
PointBuffer.hpp
lvr2::convert
void convert(COORD_SYSTEM from, COORD_SYSTEM to, float *point)
Definition: CoordinateTransform.cpp:46
lvr2::CoordinateTransform::transforms
bool transforms()
Definition: CoordinateTransform.hpp:69
lvr2::OPENGL_METERS
@ OPENGL_METERS
Definition: CoordinateTransform.hpp:43
lvr2::CoordinateTransform::sx
T sx
Definition: CoordinateTransform.hpp:85
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::OPENGL_MM
@ OPENGL_MM
Definition: CoordinateTransform.hpp:43
lvr2::CoordinateTransform::sz
T sz
Definition: CoordinateTransform.hpp:93
lvr2::CoordinateTransform
Stores information to transform a 3D point into a different coordinate system. It is assumed,...
Definition: CoordinateTransform.hpp:56


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:23