Go to the documentation of this file.00001 #ifndef __NYTRO_Frustum_H
00002 #define __NYTRO_Frustum_H
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "system/nyCommon.h"
00012 #include "math/nyMath.h"
00013
00014 namespace Nytro
00015 {
00016 namespace Scene
00017 {
00018 class Camera;
00019 };
00020
00021 namespace Graphics
00022 {
00023 using namespace Scene;
00024
00026 class NYTRO_API Frustum
00027 {
00028 public:
00029
00031 enum ECullState
00032 {
00033 eCullState_Outside = 0,
00034 eCullState_Inside,
00035 eCullState_Intersect
00036 };
00037
00038 Frustum();
00039 ~Frustum();
00040
00042 void calculateFrustum();
00044 bool isPointInFrustum( float32 aX, float32 aY, float32 aZ );
00046 bool isPointInFrustum( Vector3D& aPoint );
00048 bool isSphereInFrustum( float32 aX, float32 aY, float32 aZ, float32 aRadius );
00050 bool isCubeInFrustum( float32 aX, float32 aY, float32 aZ, float32 aSize );
00052 bool isBoxInFrustum( Box& rBox );
00054 void setCamera( Camera* pCamera );
00056 Camera* getCamera();
00057
00058 private:
00059
00061 float32 m_frustum[6][4];
00063 Camera* m_pCamera;
00064 };
00065 };
00066 };
00067
00068 #endif