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.

SDFData

Encapsulates all data needed for SDF-based collision detection.

SDFHydroelasticConfig

Controls properties of SDF hydroelastic collision handling.

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_sdf(mesh_src, shape_type[, ...])

Compute sparse and coarse SDF volumes for a mesh.

compute_shape_inertia(type, scale, src, density)

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

create_box_mesh(half_extents[, ...])

Create a box mesh with the given half extents.

create_empty_sdf_data()

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

generate_terrain_grid([grid_size, ...])

Generate a grid of procedural terrain blocks.

heightfield_to_mesh(heightfield, extent_x, ...)

Convert a 2D heightfield array to a watertight triangle mesh.

remesh_mesh(mesh[, method, ...])

Remeshes a Mesh object using the specified remeshing method.

transform_inertia(m, I, p, q)

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