newton.geometry#

Classes

SDF

Describes a signed distance field for simulation

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.

Mesh

Describes a triangle collision mesh for simulation

Functions

build_ccd_generic(support_func)

Build a continuous collision detection (CCD) system using a generic support function.

compute_shape_inertia(type, scale, src, density)

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

compute_shape_radius(geo_type, scale, src)

Calculates the radius of a sphere that encloses the shape, used for broadphase collision detection.

create_box(width, height, depth)

create_capsule(radius, height)

create_cone(radius, height)

create_cylinder(radius, height)

create_none()

Create an empty/null geometry.

create_plane([width, height])

Create a plane.

create_sphere(radius)

transform_inertia(m, I, p, q)

Constants

Name

Value

GEO_BOX

1

GEO_CAPSULE

2

GEO_CONE

4

GEO_CYLINDER

3

GEO_MESH

5

GEO_NONE

8

GEO_PLANE

7

GEO_SDF

6

GEO_SPHERE

0

MESH_MAXHULLVERT

64

PARTICLE_FLAG_ACTIVE

1

SHAPE_FLAG_COLLIDE_PARTICLES

4

SHAPE_FLAG_COLLIDE_SHAPES

2

SHAPE_FLAG_VISIBLE

1