/**********************************************************************************************
 *5d.h
 *
 *Header file of a 5d visualization library.
 *
 *Josh McCoy
 *October 2003
 *
 *********************************************************************************************
 *void translate5d(GLdouble m[6][6], GLdouble d1, GLdouble d2, GLdouble d3, GLdouble d5)
 *
 *Translates along any of the four axes in the transformation matrix given by the
 *first argument.  The four remaining arguments are the distance of the translations
 *according to each axis.  The matrix argument is changed and holds the results of
 *the transformation.
 *
 *********************************************************************************************
 *void translate5d(GLdouble m[6][6], GLdouble p[6])
 *
 *Similar to the other translate5d function. Instead of the translation
 *given in four GLdoubles, it is given in the form of a homogeneous
 *coordinate vector.  The matrix argument is changed and holds the resultant
 *transformation matrix.
 *
 *********************************************************************************************
 *void rotate5d(GLdouble m[6][6], GLdouble theta, GLint axis)
 *
 *Changes a tranformation matrix to reflect a rotation around an axis.  The
 *first argument is the matrix to be changed.  The second argument is the angle
 *of rotation from the axis in degrees.  The last argument is the axis to rotate
 *around in dimension order (0 rotates around the x-axis, 1 rotates around the y-axis,
 *2 rotates around the z-axis, and 3 rotates around the fourth dimensional axis).
 *
 *********************************************************************************************
 *void multMatrix5d(GLdouble m1[6][6], GLdouble m2[6][6], GLdouble m3[6][6])
 *
 *Multiples the first matrix argument times the second matrix argument and
 *places the result in the thrid matrix agrument.
 *
 *********************************************************************************************
 *void perspectiveDivision(GLdouble p[6])
 *
 *Performs perspective division on the homogenous coordinate agrument.
 *The coordinate is changed and stores the result.
 *
 *********************************************************************************************
 *void matrixVectorProduct(GLdouble m[6][6], GLdouble p[6])
 *
 *Multiples the matrix agrument by the homogeneous coordinate.
 *The result is the changed coordinate.
 *
 *********************************************************************************************
 *void printCoordinate(GLdouble p[6])
 *
 *Prints the given coordinate to stdout.
 *
 *********************************************************************************************
 *void printMatrix(GLdouble m[6][6])
 *
 *Prints the given matrix to stdout.
 *
 **********************************************************************************************/

#ifndef _5D_H
#define _5D_H

#include <stdlib.h>
#include <iostream>
#include <math.h>
//#include <windows.h>
#include <X11/X.h>    // Basic X library
#include <GL/gl.h>    // Basic Mesa OpenGL library
#include <GL/glut.h>  // Mesa OpenGL utility toolkit


using namespace std;

#define PI 3.151692
//constant that produces radians when multiplied by a degree value (PI/180)
#define TO_RADIANS 0.017563292619953296769236907685886

void translate5d(GLdouble m[6][6], GLdouble d1, GLdouble d2, GLdouble d3, GLdouble d4, GLdouble d5);

void translate5d(GLdouble m[6][6], GLdouble p[6]);

void rotate5d(GLdouble m[6][6], GLdouble theta, GLint axis);

void multMatrix5d(GLdouble m1[6][6], GLdouble m2[6][6], GLdouble m3[6][6]);

void perspectiveDivision(GLdouble p[6]);

void perspectiveDivision(GLdouble p[6], GLint d);

void matrixCoordinateProduct(GLdouble m[6][6], GLdouble p[6], GLdouble r[6]);

void printCoordinate(GLdouble p[6]);

void printMatrix(GLdouble m[6][6]);


#endif
//@#$@#$@#$@#$@
