34 lines
894 B
C++
34 lines
894 B
C++
#pragma once
|
|
|
|
#include <glm/vec2.hpp>
|
|
#include <vector>
|
|
|
|
namespace game {
|
|
class Missile;
|
|
|
|
/*
|
|
* Trace of a missile through the space.
|
|
* Useful for rendering sth. like a smoke trail to follow the rocket.
|
|
*/
|
|
class Trace {
|
|
public:
|
|
Trace(const Missile *missile);
|
|
|
|
// TODO: add velocity of the rocket or age at the points too becasue
|
|
// that enables nice rendering of speed etc. at different points
|
|
// TODO: give missile to this
|
|
void addPointFromMissile(const Missile *missile);
|
|
|
|
/*
|
|
* Trace point data to be used when rendering.
|
|
*/
|
|
struct TracePoint {
|
|
TracePoint(const Missile *missile);
|
|
|
|
const glm::vec2 position;
|
|
const float speed;
|
|
};
|
|
|
|
std::vector<TracePoint> points;
|
|
};
|
|
}
|