22 lines
462 B
C++
22 lines
462 B
C++
#include "trace.hpp"
|
|
|
|
#include <glm/gtx/norm.hpp>
|
|
|
|
#include "missile.hpp"
|
|
|
|
namespace game {
|
|
Trace::TracePoint::TracePoint(const Missile *missile)
|
|
: position(missile->position), speed(glm::length(missile->velocity))
|
|
{
|
|
}
|
|
|
|
Trace::Trace(const Missile *missile)
|
|
{
|
|
points.push_back(TracePoint(missile));
|
|
}
|
|
|
|
void Trace::addPointFromMissile(const Missile *missile)
|
|
{
|
|
points.push_back(TracePoint(missile));
|
|
}
|
|
}
|