KlassischeKeplerKriege/game/state/trace.cpp
2016-09-27 19:43:40 +02:00

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));
}
}