Module visibility

Source
Expand description

Conservative transformed-bound visibility and per-object hysteretic LOD.

VisibilityQuery reuses caller storage for bounded visible IDs and frame diagnostics without allocating. It uses the same classify path as draws.

Structs§

LodChain
LodState
VisibilityQuery
Reusable, allocation-free visible-ID storage and per-frame workload counts.
VisibilityQueryStats
One query frame’s diagnostics; all counts saturate at u32::MAX. visibility.visible includes IDs omitted because storage was full. Invalid transforms are rejected separately from culls; invalid bounds stay visible.
VisibilitySettings
VisibilityStats
Classification counts. Use Self::record for saturating accumulation. Invalid transforms contribute to tested, but not to the other fields.

Enums§

Visibility
VisibilityQueryError
Invalid query configuration. A failed frame change preserves the prior frame.

Functions§

classify
Classify with conservative transformed bounds; invalid transforms are rejected. Invalid/reversed bounds or unrepresentable world bounds remain visible. Missing frustum/eye disables the corresponding cull. An invalid distance limit or nonfinite eye disables distance culling; VisibilityQuery instead rejects those configuration errors before starting a frame.
distance_to_bounds
Distance to the nearest point on the conservative world AABB. Invalid bounds, non-affine/nonfinite transforms, nonfinite eyes or overflow in transformed bounds return zero: unknown bounds must not force a far LOD. Valid distances larger than f32::MAX return infinity.