//=========================================================================== // boxvfc.hpp : AABB (axis-aligned bounding box) View Frustum Culler (VFC) //=========================================================================== #include "vec3f.hpp" #include "plane.hpp" // POSSIBLE TYPES OF OVERLAP #define COMPLETEIN -1 #define PARTIAL 0 #define COMPLETEOUT 1 void SetFrustum(Vec3f& Eye, Vec3f& ViewDir, Vec3f& ViewUp, float Yfov, float Aspect); int BoxOverlapVF(Vec3f& Min, Vec3f& Max); inline int OverlapPlane(Plane& P, Vec3f& m, Vec3f& M); inline int RayIsectAABB(Vec3f& Start, Vec3f& Dir, Vec3f& Min, Vec3f& Max, float& InT, float& OutT); inline int EdgeIsectVF(Vec3f& Start, Vec3f& End);