QcFrustum Namespace
View-frustum culling of axis-aligned boxes (chunk sections) against the clip planes of a view-projection matrix. More...
| Header: | #include <clientcore/camera/QcFrustum.h> |
Types
Functions
| bool | intersectsBox(const QcFrustum::Planes &planes, QVector3D boxMin, QVector3D boxMax) |
| QcFrustum::Planes | planes(const QMatrix4x4 &viewProjection) |
Detailed Description
Type Documentation
[alias] QcFrustum::Planes
The six clip planes.
Function Documentation
bool QcFrustum::intersectsBox(const QcFrustum::Planes &planes, QVector3D boxMin, QVector3D boxMax)
Returns whether the box from boxMin to boxMax may be visible through planes: false only when it lies entirely outside one plane, i.e. when its corner furthest along that plane's normal does. Boxes crossing a corner of the frustum may count as visible.
QcFrustum::Planes QcFrustum::planes(const QMatrix4x4 &viewProjection)
Returns the clip planes of viewProjection as (a, b, c, d) with a x + b y + c z + d >= 0 inside: left, right, bottom, top, far and w > 0 (in front of the camera). Works for depth ranges [-1, 1] and [0, 1].