-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrajectory_renderer.h
More file actions
31 lines (24 loc) · 868 Bytes
/
trajectory_renderer.h
File metadata and controls
31 lines (24 loc) · 868 Bytes
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
#ifndef TRAJECTORY_RENDERER_H
#define TRAJECTORY_RENDERER_H
#include "renderer.h"
#include <QVector3D>
class TrajectoryRenderer : public Renderer {
public:
TrajectoryRenderer();
~TrajectoryRenderer();
void initialize() override;
void render(const QMatrix4x4& projection, const QMatrix4x4& view, const QMatrix4x4& model) override;
void setTrajectories(const QVector<QVector3D>& currentTrajectory,
const QVector<QVector3D>& predictedTrajectory);
private:
void initShaders();
QVector<QVector3D> currentTrajectory;
QVector<QVector3D> predictedTrajectory;
QOpenGLBuffer currentVBO;
QOpenGLBuffer predictedVBO;
int currentVertexCount;
int predictedVertexCount;
bool needsUpdate;
float time; // Для анимации пунктирной линии
};
#endif // TRAJECTORY_RENDERER_H