novaphy.geometry¶
Collision shapes, broadphase modes, collision-pipeline entry points, and
contact buffers. These symbols live at the top level of novaphy; they are
grouped here to mirror Newton's newton.geometry namespace.
import novaphy
shape = novaphy.CollisionShape.make_box(half_extents, body_index)
pipeline = novaphy.CollisionPipeline(model, broad_phase="sap")
contacts = pipeline.contacts()
pipeline.collide(state, contacts)
Pipeline Overview¶
A whole-model collision pass flows through the explicit pipeline:
Model shapes + SimState
│
▼
CollisionPipeline.collide(state, contacts)
│
├── broadphase candidates
├── narrowphase contact generation
▼
Contacts.rigid_contact_* / Contacts.soft_contact_*
- CollisionShape describes a shape, material, flags, local pose, and owning body/link.
- BroadPhaseMode selects
"explicit","nxn"/"all_pairs", or"sap"candidate generation. - CollisionPipeline owns the collision options and allocates contact storage sized for the bound model.
- Contacts exposes rigid contacts as
rigid_contact_*columns and particle / soft-point contacts assoft_contact_*columns.
Solvers do not run collision internally. Call
pipeline.collide(state, contacts) before solver.step(...) whenever that
step should consume contacts.
Shapes and Bounds¶
| Class | Description |
|---|---|
| AABB | Axis-aligned bounding box. |
| CollisionShape | Collision shape descriptor. |
| Mesh | Triangle mesh wrapper. |
| ShapeConfig | Shape parameters used by builder helpers. |
| ShapeFlags | Shape visibility and collision bit flags. |
| ShapeType | Shape type enumeration. |
Collision Pipeline¶
| Class | Description |
|---|---|
| BroadPhaseMode | Broadphase mode enum. |
| BroadPhasePair | Candidate overlap pair from exposed SAP broadphase utilities. |
| CollisionFilterPair | Disabled shape pair entry. |
| CollisionPipeline | Configurable broad + narrow phase pipeline. |
| SweepAndPrune | Standalone Sweep-and-Prune broadphase utility. |
Contact Data¶
| Class | Description |
|---|---|
| Contacts | Structure-of-arrays contact aggregate consumed by solvers. |
Functions¶
| Function | Description |
|---|---|
| compute_inertia_mesh() | Newton-aligned solid-mesh inertia integrator. |
Compatibility Notes¶
The following Newton-side newton.geometry APIs are not yet provided by
NovaPhy:
- Per-pair narrowphase functions (
collide_box_box,collide_sphere_sphere,collide_capsule_*, etc.) BroadPhaseAllPairs,BroadPhaseExplicit- Public
NarrowPhaseclass and top-levelcollide_shapes() - Per-contact Python object classes such as
ContactPoint/ContactManifold HydroelasticSDFand the SDF helper family (sdf_box,sdf_sphere, etc.)- BVH builders (
build_bvh_shape/particle,refit_bvh_shape/particle) compute_inertia_shape(general),compute_offset_mesh,transform_inertiaMATCH_BROKEN,MATCH_NOT_FOUNDconstants