newton.geometry.collide_box_box#

newton.geometry.collide_box_box(box1_pos, box1_rot, box1_size, box2_pos, box2_rot, box2_size)[source]#

Core contact geometry calculation for box-box collision.

Parameters:
  • box1_pos (vec3f) – Center position of the first box

  • box1_rot (mat33f) – Rotation matrix of the first box

  • box1_size (vec3f) – Half-extents of the first box along each axis

  • box2_pos (vec3f) – Center position of the second box

  • box2_rot (mat33f) – Rotation matrix of the second box

  • box2_size (vec3f) – Half-extents of the second box along each axis

Returns:

contact_dist: Vector of contact distances (wp.inf for unpopulated contacts) contact_pos: Matrix of contact positions (one per row) contact_normals: Matrix of contact normal vectors (one per row)

Return type:

Tuple containing