#include "../include/sharedIncludes.h"

#define BEHIND 0
#define INTERSECTS 1
#define FRONT 2

#define CVector3 CVector

float PlaneDistance(CVector3 Normal, CVector3 Point);

/* This checks to see if a line intersects a plane and returns the point of intersection (if a return vector is given) */
bool LinePlaneIntersection(CVector3 vPoly[], CVector3 vLine[], CVector3 &vNormal, float &originDistance, CVector3 &ip);

/* This returns true if the line intersects the polygon and puts the intersection point in ip */
bool LinePolygonIntersection(CVector3 vPoly[], CVector3 vLine[], int verticeCount, CVector3 &ip);

/* This tells if a sphere is BEHIND, in FRONT, or INTERSECTS a plane, also it's distance */
int SpherePlaneIntersection(CVector3 &vCenter, CVector3 &vNormal, CVector3 &vPoint, float radius, float &distance);

/* This returns true if our sphere collides with the triangle passed in */
bool SpherePolygonIntersection(CVector3 vTriangle[], CVector3 &vCenter, float radius);

