#ifndef COORD_H_
#define COORD_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <math.h>
#include "vertex.h"

#define COORD_ABS(X)	((X) < 0 ? -(X) : (X))
#define COORD_EPSILON	0.1f
#define COORD_PI		3.1415926535f

struct		s_coord
{
	GLfloat	px;
	GLfloat	py;
	GLfloat	pz;
	GLfloat	rx;
	GLfloat	ry;
	GLfloat	rz;
};

void	coord_collide (struct s_coord*);
void	coord_interpolate_pos_relative (struct s_coord *, const struct s_coord*, float);
void	coord_interpolate_rot_relative (struct s_coord*, const struct s_coord*, float, char);
void	coord_interpolate_pos_speed (struct s_coord*, struct s_coord*, const struct s_coord*, float, float);
void	coord_interpolate_rot_speed (struct s_coord*, struct s_coord*, const struct s_coord*, float, float, char);
void	coord_copy_pos (struct s_coord*, const struct s_coord*);
void	coord_copy_rot (struct s_coord*, const struct s_coord*);
void	coord_set_pos (struct s_coord*, float, float, float);
void	coord_set_rot (struct s_coord*, float, float, float);
void	coord_item (const struct s_coord*);
void	coord_stop (void);
void	coord_view (const struct s_coord*);

#ifdef __cplusplus
}
#endif

#endif
