Pioneer
Loading...
Searching...
No Matches
SpeedLines.h
Go to the documentation of this file.
1// Copyright © 2008-2023 Pioneer Developers. See AUTHORS.txt for details
2// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3
4#ifndef _SPEEDLINES_H
5#define _SPEEDLINES_H
6
7#include "graphics/Material.h"
9#include "matrix4x4.h"
10#include "vector3.h"
11
12#include <memory>
13#include <vector>
14
15namespace Graphics {
16 class Renderer;
17} // namespace Graphics
18
19class Ship;
20
21// virtual space dust to give a sense of movement
22
24public:
26
27 void Update(float time);
29
30 void SetTransform(const matrix4x4d &t) { m_transform = t; }
31
32 Ship *GetShip() const { return m_ship; }
33
34private:
35 static void Init();
36 static float BOUNDS;
37 static int DEPTH;
38 static float SPACING;
39 static float MAX_VEL;
40
41 void CreateVertexBuffer(Graphics::Renderer *r, const Uint32 size);
42
43 Ship *m_ship;
44
45 std::vector<vector3f> m_points;
46
48 std::unique_ptr<Graphics::VertexArray> m_varray;
49 std::unique_ptr<Graphics::MeshObject> m_mesh;
50
51 matrix4x4d m_transform;
52
53 bool m_visible;
54 float m_lineLength;
55 vector3f m_dir;
56};
57
58#endif
Definition Renderer.h:44
Definition RefCounted.h:36
Definition Ship.h:64
Definition SpeedLines.h:23
Ship * GetShip() const
Definition SpeedLines.h:32
void Update(float time)
Definition SpeedLines.cpp:47
void SetTransform(const matrix4x4d &t)
Definition SpeedLines.h:30
void Render(Graphics::Renderer *)
Definition SpeedLines.cpp:107
Definition Background.h:14