Krig Game Engine
Frustum.h
Go to the documentation of this file.
1 
7 #ifndef _FRUSTUM_H_
8 #define _FRUSTUM_H_
9 
10 #include "Plane.h"
11 #include "Sphere.h"
12 
13 #define NUM_PLANES 6
14 
15 class Frustum {
16  public:
17  Frustum();
18  ~Frustum();
19 
20  void extractFromProjectionMatrix(const Matrix&);
21  void getPlaneDefinition(const int&, float&, float&, float&, float&);
22 
23  int testSphere(const Sphere &sphere);
24  int testBoundingBox();
25 
26  private:
27  // 0 - left, 1 - right, 2 - down, 3 - up, 4 - far, 5 - near
28  Plane planes[NUM_PLANES];
29 };
30 
31 #endif
Representation of a plane.
represent and operate on a sphere.
Definition: Plane.h:13
Definition: matrix.h:15
Definition: Sphere.h:13
Definition: Frustum.h:15