Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals

/Users/blackie/Documents/myRepository/phobosengine-vc2005/phobosengine/phobosengine/Frustum.h

Go to the documentation of this file.
00001 
00002 
00003 #ifndef FRUSTUM_H
00004 #define FRUSTUM_H
00005 
00006 
00007 #include "Vector3f.h"
00008 
00009 
00010 #define       PLANE_RIGHT         0
00011 #define       PLANE_LEFT          1
00012 #define       PLANE_BOTTOM        2
00013 #define       PLANE_TOP           3
00014 #define       PLANE_FAR           4
00015 #define       PLANE_NEAR          5
00016 
00017 
00018 namespace pge {
00019 
00020         class AABB;
00021 
00022         class Frustum {
00023 
00024         public:
00025                 //************************************************************************
00026                 //
00027                 // Constructor
00028                 //
00029                 //************************************************************************
00031                 Frustum(void);
00032 
00033 
00034                 //************************************************************************
00035                 //
00036                 // Destructor
00037                 //
00038                 //************************************************************************
00040                 ~Frustum(void);
00041 
00042 
00043                 //************************************************************************
00044                 //
00045                 // Functions
00046                 //
00047                 //************************************************************************
00048 
00050                 void update(void);
00051 
00053                 bool isPointInside(Vector3f v);
00054 
00055                 bool isPointInside(float x, float y, float z);
00056                 bool isAABBInside(AABB *aabb);
00057                 float getDistanceToPlane(int plane, float x, float y, float z);
00058 
00059 
00060         private:
00061                 //************************************************************************
00062                 //
00063                 // Functions
00064                 //
00065                 //************************************************************************
00067                 void normalizePlane(int plane);
00068 
00069 
00070                 //************************************************************************
00071                 //
00072                 // Variables
00073                 //
00074                 //************************************************************************
00075                 float m_frustum[6][4];
00076         };
00077 };
00078 
00079 #endif

Generated on Mon Oct 16 12:08:10 2006 for Phobosengine by doxygen 1.3.4