My Project
CameraFrustum.h
1 #pragma once
2 #include "ShapeSphere.h"
3 #include "ShapeFrustum.h"
4 
5 namespace ParaEngine
6 {
7  class CShapeAABB;
8 
11  {
12  public:
13  virtual void UpdateFrustum(const Matrix4* matViewProj, bool bInversedMatrix = false, float fNearPlane = 0.f, float fFarPlane = 1.f);
14 
15  inline float GetViewDepth(){ return m_fViewDepth; };
16 
19  bool TestBox_sphere_far_plane(const CShapeAABB* box) const;
20 
26  int TestBoxInsideFarPlane(const CShapeAABB* box) const;
27 
28 
30  float m_fViewDepth;
44  };
45 }
virtual void UpdateFrustum(const Matrix4 *matViewProj, bool bInversedMatrix=false, float fNearPlane=0.f, float fFarPlane=1.f)
build a frustum from a camera (projection, or viewProjection) matrix
Definition: CameraFrustum.cpp:16
int TestBoxInsideFarPlane(const CShapeAABB *box) const
this is the same as TestBox, except that the box must be completely inside the far plane...
Definition: CameraFrustum.cpp:81
CShapeSphere m_boundingSphere
bounding sphere
Definition: CameraFrustum.h:43
different physics engine has different winding order.
Definition: EventBinding.h:32
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
Standard 2-dimensional vector.
Definition: ParaVector2.h:16
bool TestBox_sphere_far_plane(const CShapeAABB *box) const
this is the same as the TestBox, except that the far plane is treated as a sphere plane whose radius ...
Definition: CameraFrustum.cpp:35
Definition: ShapeSphere.h:6
AABB-related code.
Definition: ShapeAABB.h:11
float m_fViewDepth
the distance between the near plane and far plane in world coordinate.
Definition: CameraFrustum.h:30
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: ParaMatrix4.h:23
float v2DCircleRadius
the radius of the 2D circle.
Definition: CameraFrustum.h:41
Vector3 m_vEyeOrigin
the eye origin
Definition: CameraFrustum.h:32
Vector2 v2DCircleCenter
2D circle center.
Definition: CameraFrustum.h:38
a general view frustum class.
Definition: ShapeFrustum.h:9
the camera view culling frustum
Definition: CameraFrustum.h:10