newton.geometry#

Classes

BroadPhaseAllPairs

A broad phase collision detection class that performs N x N collision checks between all geometry pairs.

BroadPhaseExplicit

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

BroadPhaseSAP

Sweep and Prune (SAP) broad phase collision detection.

DeformableVisualMesh

Fixed visual geometry attached to simulation elements.

DeformableVisuals

Current evaluated geometry for a model's deformable visual meshes.

HydroelasticSDF

Hydroelastic contact generation with SDF-based collision detection.

NarrowPhase

Resolve broad-phase shape pairs into simulation contacts.

ParticleSurface

Reusable context for extracting a triangle mesh from particle data.

TriMeshCollisionInfo

Bounded buffers produced by triangle-mesh self-collision queries.

Functions

collide_box_box(box1_pos, box1_rot, ...[, ...])

Core contact geometry calculation for box-box collision.

collide_capsule_box(capsule_pos, ...)

Core contact geometry calculation for capsule-box collision.

collide_capsule_capsule(cap1_pos, cap1_axis, ...)

Core contact geometry calculation for capsule-capsule collision.

collide_plane_box(plane_normal, plane_pos, ...)

Core contact geometry calculation for plane-box collision.

collide_plane_capsule(plane_normal, ...)

Core contact geometry calculation for plane-capsule collision.

collide_plane_cylinder(plane_normal, ...)

Core contact geometry calculation for plane-cylinder collision.

collide_plane_ellipsoid(plane_normal, ...)

Core contact geometry calculation for plane-ellipsoid collision.

collide_plane_sphere(plane_normal, ...)

collide_sphere_box(sphere_pos, ...)

Core contact geometry calculation for sphere-box collision.

collide_sphere_capsule(sphere_pos, ...)

Core contact geometry calculation for sphere-capsule collision.

collide_sphere_cylinder(sphere_pos, ...)

Core contact geometry calculation for sphere-cylinder collision.

collide_sphere_sphere(pos1, radius1, pos2, ...)

Sphere-sphere collision calculation.

compute_inertia_shape(type, scale, src, density)

Computes the mass, center of mass and 3x3 inertia tensor of a shape

compute_offset_mesh(shape_type[, shape_geo, ...])

Compute the offset (Minkowski-inflated) isosurface mesh of a shape.

create_empty_sdf_data()

Create an empty SDFData struct for shapes that don't need SDF collision.

extract_particle_surface(positions, radii, ...)

Extract a triangle mesh from particle positions (one-shot convenience).

sdf_box(point, hx, hy, hz)

Compute signed distance to an axis-aligned box.

sdf_capsule(point, radius, half_height[, ...])

Compute signed distance to a capsule for Mesh.create_capsule geometry.

sdf_cone(point, radius, half_height[, up_axis])

Compute signed distance to a cone for Mesh.create_cone geometry.

sdf_cylinder(point, radius, half_height[, ...])

Compute signed distance to Mesh.create_cylinder geometry.

sdf_mesh(mesh, point, max_dist)

Compute signed distance to a triangle mesh.

sdf_plane(point, width, length)

Compute signed distance to a finite quad in the XY plane.

sdf_sphere(point, radius)

Compute signed distance to a sphere for Mesh.create_sphere geometry.

transform_inertia(mass, inertia, offset, quat)

Compute a rigid body's inertia tensor expressed in a new coordinate frame.