/*********************************************************************//**
*	Interpolation object.
*	Zde je implementovan objekt, ktery se pouziva k interpolaci pohybu
*	mezi aktualizacemi pohybu.
*
*	author: Michal Jirous
*	date: 09.04.2009
*	file: interpolation.cpp
**********************************************************************/

#include "interpolation.h"
#include "sys_controller.h"

void Interpolation::drawRun( float percentage )
{
	current = start + (target - start) * percentage;
}

void Interpolation::update( float x, float y, float z )
{
	update( Vector( x, y, z ) );
}


void Interpolation::reset( Vector position )
{
	start = position;
	current = start;
	target = position;
}

void Interpolation::update( Vector newTarget )
{
	start = target;
	current = start;
	target = newTarget;
}
