Lumino.Math
D:/Proj/Lumino.Math/include/Lumino/Math/ViewFrustum.h
00001 
00002 #ifndef LUMINO_MATH_VIEWFRUSTUM_H
00003 #define LUMINO_MATH_VIEWFRUSTUM_H
00004 
00005 #include "Common.h"
00006 #include "Plane.h"
00007 
00008 namespace Lumino
00009 {
00010 class Matrix;
00011 
00022 class LUMINO_EXPORT ViewFrustum
00023 {
00024 public:
00025 
00030     ViewFrustum(const Matrix& viewProjMatrix);
00031 
00032 public:
00033     
00038     void SetViewProjMatrix(const Matrix& viewProjMatrix);
00039 
00045     bool Intersects(const Vector3& point) const;
00046 
00053     bool Intersects(const Vector3& center, float radius) const;
00054 
00060     void GetCornerPoints(Vector3* points) const;
00061 
00065     const Plane& GetPlane(FrustumPlane plane) const { return mPlanes[plane]; }
00066 
00067 private:
00068     Plane       mPlanes[FrustumPlane_Max];
00069     Matrix      mViewProjMatrix;
00070 };
00071 
00072 } // namespace Lumino
00073 
00074 #endif // LUMINO_MATH_VIEWFRUSTUM_H
 All Classes Functions Variables Friends