Header menu logo Mibo

Culling Module

Generic helper functions for visibility culling.

These are thin wrappers over MonoGame's native BoundingFrustum, BoundingSphere, and BoundingBox.

Functions and values

Function or value Description

isVisible frustum sphere

Full Usage: isVisible frustum sphere

Parameters:
Returns: bool
Modifiers: inline

Checks if a bounding sphere is within the view frustum.

Returns true if fully inside or intersecting (partially visible).

frustum : BoundingFrustum
sphere : BoundingSphere
Returns: bool

isVisible2D viewBounds itemBounds

Full Usage: isVisible2D viewBounds itemBounds

Parameters:
Returns: bool
Modifiers: inline

Checks if a 2D rectangle intersects with visible camera bounds.

Use with Camera2D.viewportBounds to get the view bounds.

viewBounds : Rectangle
itemBounds : Rectangle
Returns: bool

isVisibleBox frustum box

Full Usage: isVisibleBox frustum box

Parameters:
Returns: bool
Modifiers: inline

Checks if an axis-aligned bounding box is within the view frustum.

Returns true if fully inside or intersecting (partially visible). Useful for culling axis-aligned geometry or spatial partition nodes.

frustum : BoundingFrustum
box : BoundingBox
Returns: bool

Type something to start searching.