newton.geometry.collide_capsule_box#

newton.geometry.collide_capsule_box(capsule_pos, capsule_axis, capsule_radius, capsule_half_length, box_pos, box_rot, box_size)[source]#

Core contact geometry calculation for capsule-box collision.

Parameters:
  • capsule_pos (vec3f) – Center position of the capsule

  • capsule_axis (vec3f) – Axis direction of the capsule

  • capsule_radius (float) – Radius of the capsule

  • capsule_half_length (float) – Half length of the capsule

  • 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

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