#ifndef COORD_CONVERTOR_H
#define COORD_CONVERTOR_H

#include "../math/Mathematics.h"

///Converts coordinates between server and client unit system.
class CoordConvertor
{
private:
	double serverToClientScaleFactor;
	ANALYTICAL_GEOMETRY::Vector_3<double> centerOffset;

public:
	CoordConvertor( double serverToClientScaleFactor );

	void setClientCoordCenter( ANALYTICAL_GEOMETRY::Point_3<double> &clientCenter );

	double convertServerToClientValue( const double value ) const;
	double convertClientToServerValue( const double value ) const;

	ANALYTICAL_GEOMETRY::Point_3<double>  convertServerToClientPoint( const ANALYTICAL_GEOMETRY::Point_3<double> &serverPoint ) const;
	ANALYTICAL_GEOMETRY::Point_3<double> convertClientToServerPoint( const ANALYTICAL_GEOMETRY::Point_3<double> &clientPoint ) const;
	ANALYTICAL_GEOMETRY::Vector_3<double> getCenterOffset(void) const;
};

#endif