KlassischeKeplerKriege/game/state/trace.cpp

23 lines
462 B
C++
Raw Normal View History

2016-09-27 17:43:40 +00:00
#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));
}
}