-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathVelocityVisualization.h
More file actions
64 lines (50 loc) · 1.74 KB
/
VelocityVisualization.h
File metadata and controls
64 lines (50 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef VELOCITYVISUALIZATION_H
#define VELOCITYVISUALIZATION_H
#include <GL/glew.h>
#include <Eigen/StdVector>
#include <QGLWidget>
#include <QtOpenGL>
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <Eigen\Core>
#include <Eigen/Geometry>
#include <Eigen/Array>
#include <Eigen/QR>
#include <Eigen/LU>
#include "GeometricTools.h"
#include "GraphicTools.h"
USING_PART_OF_NAMESPACE_EIGEN
class VelocityVisualization : public QGLWidget
{
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
VelocityVisualization();
~VelocityVisualization();
double rotX, rotY, rotZ;
void resizeGL(int width, int height);
short int col;
void setPlanes(std::vector<Eigen::Transform3f, Eigen::aligned_allocator<Eigen::Transform3f> > trackingData, Eigen::Matrix4f &calibrationMatrix, int maxX, int maxY);
void setVelocityField(Eigen::Vector3f* velocityField, const int &maxX, const int &maxY, const int &maxZ, const float &physicalX, const float &physicalY, const float &physicalZ);
void setPlane(std::vector<Eigen::Vector3f> *plane, const int &maxX, const int &maxY, const float &scaleX, const float &scaleY);
protected:
void initializeGL();
void paintGL();
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void wheelEvent(QWheelEvent *event);
void timerEvent(QTimerEvent *event);
void keyPressEvent ( QKeyEvent * event );
private:
GraphicTools m_graphicTools;
unsigned int m_velocityField;
unsigned int m_plane;
Eigen::Vector4f m_centroid;
// mouse interaction variables
double m_rotationX;
double m_rotationY;
double m_rotationZ;
double m_scale;
double m_translationZ;
QPointF m_lastPosition;
};
#endif // VelocityVisualization_H