|
My Project
|
the camera view culling frustum More...
#include <CameraFrustum.h>
Public Member Functions | |
| 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 More... | |
| float | GetViewDepth () |
| 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 is m_fViewDepth. More... | |
| int | TestBoxInsideFarPlane (const CShapeAABB *box) const |
| this is the same as TestBox, except that the box must be completely inside the far plane. More... | |
Public Member Functions inherited from ParaEngine::CShapeFrustum | |
| CShapeFrustum (const Matrix4 *matrix) | |
| build a frustum from a camera (projection, or viewProjection) matrix | |
| bool | TestSphere (const CShapeSphere *sphere) const |
| bool | TestSweptSphere (const CShapeSphere *sphere, const Vector3 *sweepDir) const |
| int | TestBox (const CShapeAABB *box) const |
| Tests if an AABB is inside/intersecting the view frustum. More... | |
| Plane & | GetPlane (int nIndex) |
| Get a given frustum plane. More... | |
| bool | CullPointWithPlane (int iPlane, const Vector3 *vPos) |
| whether the point is inside a given plane. More... | |
| bool | CullPointsWithFrustum (Vector3 *pVecBounds, int nCount) |
| return true if any of the point is inside the frustum | |
Public Attributes | |
| float | m_fViewDepth |
| the distance between the near plane and far plane in world coordinate. More... | |
| Vector3 | m_vEyeOrigin |
| the eye origin | |
| Vector2 | v2DCircleCenter |
| 2D circle center. More... | |
| float | v2DCircleRadius |
| the radius of the 2D circle. More... | |
| CShapeSphere | m_boundingSphere |
| bounding sphere | |
Public Attributes inherited from ParaEngine::CShapeFrustum | |
| Vector3 | vecFrustum [8] |
| corners of the view frustum | |
| Plane | planeFrustum [6] |
| planes of the view frustum | |
| int | nVertexLUT [6] |
Additional Inherited Members | |
Static Public Member Functions inherited from ParaEngine::CShapeFrustum | |
| static bool | SweptSpherePlaneIntersect (float &t0, float &t1, const Plane *plane, const CShapeSphere *sphere, const Vector3 *sweepDir) |
| this function tests if the projection of a bounding sphere along the light direction intersects the view frustum | |
the camera view culling frustum
| bool ParaEngine::CCameraFrustum::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 is m_fViewDepth.
this is currently used by terrain view frustum
| int ParaEngine::CCameraFrustum::TestBoxInsideFarPlane | ( | const CShapeAABB * | box | ) | const |
this is the same as TestBox, except that the box must be completely inside the far plane.
|
virtual |
build a frustum from a camera (projection, or viewProjection) matrix
| matViewProj | the view projection matrix. |
| bInversedMatrix | if this is true, matViewProj is the inverse of standard matViewProj |
| fNearPlane | the near plane in viewProjection coordinate, default to 0.f |
| fFarPlane | the far plane in viewProjection coordinate, default to 1.f |
Reimplemented from ParaEngine::CShapeFrustum.
| float ParaEngine::CCameraFrustum::m_fViewDepth |
the distance between the near plane and far plane in world coordinate.
| Vector2 ParaEngine::CCameraFrustum::v2DCircleCenter |
2D circle center.
It is the center of the smallest circle on the y=0 plane, which contains the Frustum projection on to the 2D plane. The information is used for rough object-level culling.
| float ParaEngine::CCameraFrustum::v2DCircleRadius |
the radius of the 2D circle.
v2DCircleCenter
1.8.12