1 //------------------------------------------------------------------------------
3 //------------------------------------------------------------------------------
4 // GLVU : Copyright 1997 - 2002
5 // The University of North Carolina at Chapel Hill
6 //------------------------------------------------------------------------------
7 // Permission to use, copy, modify, distribute and sell this software and its
8 // documentation for any purpose is hereby granted without fee, provided that
9 // the above copyright notice appear in all copies and that both that copyright
10 // notice and this permission notice appear in supporting documentation.
11 // Binaries may be compiled with this software without any royalties or
14 // The University of North Carolina at Chapel Hill makes no representations
15 // about the suitability of this software for any purpose. It is provided
16 // "as is" without express or implied warranty.
18 //============================================================================
19 // camutils.hpp : a set of camera utility functions
20 //============================================================================
28 int CamTriOverlap(const Vec3f V[8], const float P[][4],
29 const Vec3f& A, const Vec3f& B, const Vec3f& C);
30 int CamTriOverlap(const Camera *Cam,
31 const Vec3f& A, const Vec3f& B, const Vec3f& C);
35 const Vec3f& A, const Vec3f& B, const Vec3f& C, const Vec3f& D);
39 const float A[3], const float B[3], const float C[3], const float D[3]);
41 void CalcCamPlanes(const Vec3f V[8], float P[][4]);
43 void CalcCamPlanes(const Camera *Cam, float P[][4]);
45 int CamMinMaxBoxOverlap(const Camera *Cam,
46 const Vec3f cV[8], const float cP[][4],
47 const Vec3f& m, const Vec3f& M);
49 int CamMinMaxBoxOverlap(const Camera *Cam,
50 const float m[3], const float M[3]);
52 bool VFC(const Camera *Cam, const float m[3], const float M[3]);
54 int CamCamOverlap(const Vec3f V1[8], const float P1[][4],
55 const Vec3f V2[8], const float P2[][4]);
56 int CamCamOverlap(const Camera *Cam1, const Camera *Cam2);
58 void CamReflectAboutPlane(Camera *Cam, const float Plane[4]);