newton.geometry.BroadPhaseExplicit#

class newton.geometry.BroadPhaseExplicit[source]#

Bases: object

A broad phase collision detection class that only checks explicitly provided geometry pairs.

This class performs collision detection only between geometry pairs that are explicitly specified, rather than checking all possible pairs. This can be more efficient when the set of potential collision pairs is known ahead of time.

The class checks for axis-aligned bounding box (AABB) overlaps between the specified geometry pairs, taking into account per-geometry cutoff distances.

__init__()#
launch(geom_lower, geom_upper, geom_cutoffs, geom_pairs, geom_pair_count, candidate_pair, num_candidate_pair)#

Launch the explicit pairs broad phase collision detection.

This method checks for AABB overlaps only between explicitly specified geometry pairs, rather than checking all possible pairs. It populates the candidate_pair array with indices of geometry pairs whose AABBs overlap when expanded by their cutoff distances.

Parameters:
  • geom_lower (array(ndim=1, dtype=vec3f)) – Array of lower bounds for geometry bounding boxes

  • geom_upper (array(ndim=1, dtype=vec3f)) – Array of upper bounds for geometry bounding boxes

  • geom_cutoffs (array(ndim=1, dtype=float32)) – Array of cutoff distances per geometry box

  • geom_pairs (array(ndim=1, dtype=vec2i)) – Array of precomputed geometry pairs to check

  • geom_pair_count (int) – Number of geometry pairs to check

  • candidate_pair (array(ndim=1, dtype=vec2i)) – Output array to store overlapping geometry pairs

  • num_candidate_pair (array(ndim=1, dtype=int32)) – Output array to store number of overlapping pairs found

The method will populate candidate_pair with the indices of geometry pairs whose AABBs overlap when expanded by their cutoff distances, but only checking the explicitly provided pairs.