/* 
   Project: coevolutionary GP moto driving
   Dana Vrajitoru
   general.h
   
   Some functions that don't fit anywhere else.  
*/

#ifndef GENERAL_H
#define GENERAL_H

#include <GL/glut.h>
#include "gl_draw.h"

// Add the speed to the angle and make sure that they are within the
// range 0 to 360.
void update_angle(GLfloat &angle, GLfloat &speed);

// Set the coordinates of a point with given values, 0 by default.
void set_point3f(Point3f &point, 
		 GLfloat x = 0.0, GLfloat y = 0.0, GLfloat z = 0.0);

// Rotate by a Point3f.
void rotate_point(const Point3f &v);

// Transforming an angle from degrees to radians and the other way
// around.
float d2r(float angle);
float r2d(float angle);

#endif
