newton.geometry.collide_plane_box#

newton.geometry.collide_plane_box(plane_normal, plane_pos, box_pos, box_rot, box_size, margin=0.0)[source]#

Core contact geometry calculation for plane-box collision.

Parameters:
  • plane_normal (vec3f) – Normal vector of the plane

  • plane_pos (vec3f) – Position point on the plane

  • box_pos (vec3f) – Center position of the box

  • box_rot (mat33f) – Rotation matrix of the box

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

  • margin (float) – Contact margin for early contact generation (default: 0.0)

Returns:

contact_dist: Vector of contact distances (MAXVAL for unpopulated contacts) contact_pos: Matrix of contact positions (one per row) contact_normal: contact normal vector

Return type:

Tuple containing