/* * math_frustum.h * * Created on: 19 sept. 2011 * Author: laurent */ #ifndef MATH_FRUSTUM_H_ #define MATH_FRUSTUM_H_ #define GL3_PROTOTYPES 1 #include "GL3/gl3.h" #include "math_m4x4.h" typedef struct { GLfloat frustum[6][4]; } frustum; void frustumExtract(frustum *f, m4x4 *P, m4x4 *MV); GLboolean frustumTestPoint(frustum *f, float x, float y, float z ); GLboolean frustumTestSphere(frustum *f, float x, float y, float z, float radius ); GLfloat frustumDistanceSphere(frustum *f, float x, float y, float z, float radius ); void frustumPrint(frustum *f); #endif /* MATH_FRUSTUM_H_ */