simvx.graphics.scene.frustum¶
View frustum culling utilities.
Module Contents¶
Classes¶
View frustum defined by 6 planes for culling. |
Data¶
API¶
- simvx.graphics.scene.frustum.__all__¶
[‘Frustum’]
- class simvx.graphics.scene.frustum.Frustum¶
View frustum defined by 6 planes for culling.
Initialization
- extract_from_matrix(vp: numpy.ndarray) None¶
Extract frustum planes from view-projection matrix.
Planes: left, right, bottom, top, near, far.
- test_sphere(center: numpy.ndarray, radius: float) bool¶
Test if sphere intersects or is inside the frustum.
- test_aabb(min_bounds: numpy.ndarray, max_bounds: numpy.ndarray) bool¶
Test if AABB intersects the frustum.
- cull_spheres(centers: numpy.ndarray, radii: numpy.ndarray) numpy.ndarray¶
Vectorized frustum cull for many bounding spheres.
Args: centers: (N, 3) array of sphere centers. radii: (N,) array of radii.
Returns: boolean mask (N,) — True = visible.