]> git.mxchange.org Git - simgear.git/blob - simgear/scene/sky/clouds3d/camutils.hpp
Clouds3D crashes because there is no Light
[simgear.git] / simgear / scene / sky / clouds3d / camutils.hpp
1 //------------------------------------------------------------------------------
2 // File : camutils.hpp
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 
12 // restrictions. 
13 //
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.
17
18 //============================================================================
19 // camutils.hpp : a set of camera utility functions
20 //============================================================================
21
22 #include "camera.hpp"
23
24 #define COMPLETEOUT 1
25 #define PARTIAL 0
26 #define COMPLETEIN -1
27
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);
32
33 int CamQuadOverlap(
34   const Camera *Cam, 
35   const Vec3f& A, const Vec3f& B, const Vec3f& C, const Vec3f& D); 
36
37 int CamQuadOverlap(
38   const Camera *Cam, 
39   const float A[3], const float B[3], const float C[3], const float D[3]);
40
41 void CalcCamPlanes(const Vec3f V[8], float P[][4]);
42
43 void CalcCamPlanes(const Camera *Cam, float P[][4]);
44
45 int CamMinMaxBoxOverlap(const Camera *Cam, 
46                         const Vec3f cV[8], const float cP[][4], 
47                         const Vec3f& m, const Vec3f& M);
48
49 int CamMinMaxBoxOverlap(const Camera *Cam, 
50                         const float m[3], const float M[3]);
51
52 bool VFC(const Camera *Cam, const float m[3], const float M[3]);
53
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);
57
58 void CamReflectAboutPlane(Camera *Cam, const float Plane[4]);