vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::Culling Namespace Reference

The culls past the frustum test, which is Math::frustumIntersectsAABB. More...

Functions

bool isNearEnough (const Math::AABB &bounds, const VisibilityContext &context)
 Distance culling: whether the AABB's centre is within maxDistance of the camera.
bool isLargeEnough (const Math::AABB &bounds, const VisibilityContext &context)
 Screen-size culling: whether the AABB's bounding sphere projects to minPixels or more.

Detailed Description

The culls past the frustum test, which is Math::frustumIntersectsAABB.

Function Documentation

◆ isNearEnough()

bool Vkm::Engine::Culling::isNearEnough ( const Math::AABB & bounds,
const VisibilityContext & context )
inline

Distance culling: whether the AABB's centre is within maxDistance of the camera.

Parameters
boundsWorld-space AABB.
contextSupplies cameraPosition and maxDistance (0 or below disables).
Returns
Whether the box survives.

◆ isLargeEnough()

bool Vkm::Engine::Culling::isLargeEnough ( const Math::AABB & bounds,
const VisibilityContext & context )
inline

Screen-size culling: whether the AABB's bounding sphere projects to minPixels or more.

The test does not apply behind the camera, under an orthographic view, with a zero viewport, or with minPixels at 0 or below.

Parameters
boundsWorld-space AABB.
contextSupplies the view and screenSizeThresholdSq.
Returns
Whether the box survives.