Arrow.hpp
Go to the documentation of this file.
1 
28  /*
29  * PointCloud.h
30  *
31  * Created on: 02.09.2008
32  * Author: twiemann
33  */
34 
35 #ifndef ARROW_H_
36 #define ARROW_H_
37 
39 
41 
42 #include <vector>
43 #include <string>
44 #include <fstream>
45 #include <stdio.h>
46 #include <stdlib.h>
47 
48 
49 using namespace std;
50 
51 namespace lvr2
52 {
53 
54 class Arrow : public Renderable{
55 public:
56  Arrow(string filename);
57  Arrow(int color);
58  virtual ~Arrow();
59  virtual inline void render();
60 
61  void setPosition(double x, double y, double z, double roll, double pitch, double yaw);
62 
63  inline void setColor(int color) {
64  this->color = color;
65  };
66 
67 private:
68  double roll, pitch, yaw;
69  int color;
71 };
72 
73 
74 
75 
76 inline void EulerToMatrix(const double *rPos, const double *rPosTheta, float *alignxf)
77 {
78  double sx = sin(rPosTheta[0]);
79  double cx = cos(rPosTheta[0]);
80  double sy = sin(rPosTheta[1]);
81  double cy = cos(rPosTheta[1]);
82  double sz = sin(rPosTheta[2]);
83  double cz = cos(rPosTheta[2]);
84 
85  alignxf[0] = cy*cz;
86  alignxf[1] = sx*sy*cz + cx*sz;
87  alignxf[2] = -cx*sy*cz + sx*sz;
88  alignxf[3] = 0.0;
89  alignxf[4] = -cy*sz;
90  alignxf[5] = -sx*sy*sz + cx*cz;
91  alignxf[6] = cx*sy*sz + sx*cz;
92  alignxf[7] = 0.0;
93  alignxf[8] = sy;
94  alignxf[9] = -sx*cy;
95  alignxf[10] = cx*cy;
96 
97  alignxf[11] = 0.0;
98 
99  alignxf[12] = rPos[0];
100  alignxf[13] = rPos[1];
101  alignxf[14] = rPos[2];
102  alignxf[15] = 1;
103 };
104 
105 } // namespace lvr2
106 
107 // @TODO Why do we need this?
108 void render();
109 
110 #endif /* Arrow_H_ */
BaseVector.hpp
lvr2::EulerToMatrix
void EulerToMatrix(const double *rPos, const double *rPosTheta, float *alignxf)
Definition: Arrow.hpp:76
lvr2::Matrix4
A 4x4 matrix class implementation for use with the provided vertex types.
Definition: Matrix4.hpp:64
lvr2::Arrow::setColor
void setColor(int color)
Definition: Arrow.hpp:63
lvr2::color
Definition: DataStruct.hpp:81
render
void render()
lvr2::Arrow
Definition: Arrow.hpp:54
lvr2::Arrow::yaw
double yaw
Definition: Arrow.hpp:68
scripts.normalize_multiple.filename
filename
Definition: normalize_multiple.py:60
lvr2::Renderable
Definition: Renderable.hpp:65
Renderable.hpp
lvr2::Arrow::color
int color
Definition: Arrow.hpp:69
std
Definition: HalfEdge.hpp:124
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::Arrow::rotation
Matrix4< BaseVector< float > > rotation
Definition: Arrow.hpp:70


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:22