GLC_Frustum : OpenGL Frustum. More...
#include <glc_frustum.h>
Public Types | |
| enum | Localisation { InFrustum = 0, IntersectFrustum = 1, OutFrustum = 3 } |
Public Member Functions | |
Constructor / Destructor | |
| GLC_Frustum () | |
| Default constructor. | |
| GLC_Frustum (const GLC_Frustum &) | |
| Copy constructor. | |
| ~GLC_Frustum () | |
| Destructor. | |
Get Functions | |
| GLC_Plane | leftClippingPlane () const |
| Return the left clipping plane. | |
| GLC_Plane | rightClippingPlane () const |
| Return the Right clipping plane. | |
| GLC_Plane | topClippingPlane () const |
| Return the top clipping plane. | |
| GLC_Plane | bottomClippingPlane () const |
| Return the bottom clipping plane. | |
| GLC_Plane | nearClippingPlane () const |
| Return the near clipping plane. | |
| GLC_Plane | farClippingPlane () const |
| Return the far clipping plane. | |
| Localisation | localizeBoundingBox (const GLC_BoundingBox &) const |
| Localize bounding box. | |
| Localisation | localizeSphere (const GLC_Point3d &, double) const |
| Localize sphere. | |
Set Functions | |
| void | setLeftClippingPlane (const GLC_Plane &plane) |
| Set the left clipping plane. | |
| void | setRightClippingPlane (const GLC_Plane &plane) |
| Set the right clipping plane. | |
| void | setTopClippingPlane (const GLC_Plane &plane) |
| Set the top clipping plane. | |
| void | setBottomClippingPlane (const GLC_Plane &plane) |
| Set the bottom clipping plane. | |
| void | setNearClippingPlane (const GLC_Plane &plane) |
| Set the near clipping plane. | |
| void | setFarClippingPlane (const GLC_Plane &plane) |
| Set the far clipping plane. | |
| bool | update (const GLC_Matrix4x4 &) |
| Update the frustum. | |
Private Types | |
| enum | planeId { LeftPlane = 0, RightPlane = 1, TopPlane = 2, BottomPlane = 3, NearPlane = 4, FarPlane = 5 } |
Private Member Functions | |
| Localisation | localizeSphereToPlane (const GLC_Point3d &, double, const GLC_Plane &) const |
| localize a sphere to a plane | |
Private Attributes | |
| QList< GLC_Plane > | m_PlaneList |
| The list of frustum plane. | |
| GLC_Matrix4x4 | m_PreviousMatrix |
| The previous frustum matrix. | |
GLC_Frustum : OpenGL Frustum.
GLC_Frustum by 6 planes
Definition at line 39 of file glc_frustum.h.
Definition at line 52 of file glc_frustum.h.
enum GLC_Frustum::planeId [private] |
Definition at line 42 of file glc_frustum.h.
| GLC_Frustum::GLC_Frustum | ( | ) |
| GLC_Frustum::GLC_Frustum | ( | const GLC_Frustum & | frustum | ) |
Copy constructor.
Definition at line 37 of file glc_frustum.cpp.
| GLC_Frustum::~GLC_Frustum | ( | ) |
Destructor.
Definition at line 44 of file glc_frustum.cpp.
| GLC_Plane GLC_Frustum::bottomClippingPlane | ( | ) | const [inline] |
Return the bottom clipping plane.
Definition at line 92 of file glc_frustum.h.
| GLC_Plane GLC_Frustum::farClippingPlane | ( | ) | const [inline] |
Return the far clipping plane.
Definition at line 100 of file glc_frustum.h.
| GLC_Plane GLC_Frustum::leftClippingPlane | ( | ) | const [inline] |
Return the left clipping plane.
Definition at line 80 of file glc_frustum.h.
| GLC_Frustum::Localisation GLC_Frustum::localizeBoundingBox | ( | const GLC_BoundingBox & | box | ) | const |
Localize bounding box.
Definition at line 49 of file glc_frustum.cpp.
References GLC_BoundingBox::boundingSphereRadius(), GLC_BoundingBox::center(), and localizeSphere().
Referenced by GLC_OctreeNode::updateViewableInstances().
| GLC_Frustum::Localisation GLC_Frustum::localizeSphere | ( | const GLC_Point3d & | center, | |
| double | radius | |||
| ) | const |
Localize sphere.
Definition at line 57 of file glc_frustum.cpp.
References InFrustum, localizeSphereToPlane(), m_PlaneList, and OutFrustum.
Referenced by localizeBoundingBox(), and GLC_OctreeNode::updateViewableInstances().
| GLC_Frustum::Localisation GLC_Frustum::localizeSphereToPlane | ( | const GLC_Point3d & | center, | |
| double | radius, | |||
| const GLC_Plane & | plane | |||
| ) | const [private] |
localize a sphere to a plane
Definition at line 74 of file glc_frustum.cpp.
References GLC_Plane::distanceToPoint(), InFrustum, IntersectFrustum, and OutFrustum.
Referenced by localizeSphere().
| GLC_Plane GLC_Frustum::nearClippingPlane | ( | ) | const [inline] |
Return the near clipping plane.
Definition at line 96 of file glc_frustum.h.
| GLC_Plane GLC_Frustum::rightClippingPlane | ( | ) | const [inline] |
Return the Right clipping plane.
Definition at line 84 of file glc_frustum.h.
| void GLC_Frustum::setBottomClippingPlane | ( | const GLC_Plane & | plane | ) | [inline] |
Set the bottom clipping plane.
Definition at line 130 of file glc_frustum.h.
| void GLC_Frustum::setFarClippingPlane | ( | const GLC_Plane & | plane | ) | [inline] |
Set the far clipping plane.
Definition at line 138 of file glc_frustum.h.
| void GLC_Frustum::setLeftClippingPlane | ( | const GLC_Plane & | plane | ) | [inline] |
Set the left clipping plane.
Definition at line 118 of file glc_frustum.h.
| void GLC_Frustum::setNearClippingPlane | ( | const GLC_Plane & | plane | ) | [inline] |
Set the near clipping plane.
Definition at line 134 of file glc_frustum.h.
| void GLC_Frustum::setRightClippingPlane | ( | const GLC_Plane & | plane | ) | [inline] |
Set the right clipping plane.
Definition at line 122 of file glc_frustum.h.
| void GLC_Frustum::setTopClippingPlane | ( | const GLC_Plane & | plane | ) | [inline] |
Set the top clipping plane.
Definition at line 126 of file glc_frustum.h.
| GLC_Plane GLC_Frustum::topClippingPlane | ( | ) | const [inline] |
Return the top clipping plane.
Definition at line 88 of file glc_frustum.h.
| bool GLC_Frustum::update | ( | const GLC_Matrix4x4 & | compMatrix | ) |
Update the frustum.
Return true if the frustum as change
Definition at line 92 of file glc_frustum.cpp.
References BottomPlane, FarPlane, GLC_Matrix4x4::getData(), LeftPlane, m_PlaneList, m_PreviousMatrix, NearPlane, RightPlane, and TopPlane.
Referenced by GLC_Viewport::updateFrustum().
QList<GLC_Plane> GLC_Frustum::m_PlaneList [private] |
The list of frustum plane.
Definition at line 159 of file glc_frustum.h.
Referenced by GLC_Frustum(), localizeSphere(), and update().
GLC_Matrix4x4 GLC_Frustum::m_PreviousMatrix [private] |