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_ */
Stores information to transform a 3D point into a different coordinate system. It is assumed...
unsigned char y
Position of the y coordinate in the target system.
void convert(COORD_SYSTEM from, COORD_SYSTEM to, float *point)
std::shared_ptr< PointBuffer > PointBufferPtr
unsigned char z
Position of the z coordinate in the target system.
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)
unsigned char x
Position of the x coordinate in the target system.


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 Mon Feb 28 2022 22:46:06