Core#
This section documents the core data structures and simulation objects in Newton Physics.
Classes#
|
Holds the definition of the simulation model |
Time-varying state data for a |
|
Time-varying control data for a |
|
|
A helper class for building simulation models at runtime. |
|
Describes a triangle collision mesh for simulation |
|
Describes a signed distance field for simulation |
- class newton.Axis(value)
Enum for representing the three axes in 3D space.
- X = 0
- Y = 1
- Z = 2
Geometry Types#
These constants define the supported geometry types for rigid body shapes in Newton simulations.
They are defined in newton.core.types
and are used when assigning collision geometry to bodies or shapes.
Constant |
Description |
---|---|
|
A sphere defined by a center and radius. |
|
An axis-aligned box defined by half-extents. |
|
A capsule defined by two endpoints and a radius. |
|
A cylinder defined by two endpoints and a radius. |
|
A cone aligned along an axis with a base radius and height. |
|
A triangle mesh with vertex and face data. |
|
A signed distance field represented on a grid. |
|
An infinite plane defined by a normal and offset. |
|
No geometry; used to mark inactive or undefined shapes. |
Joint Types#
These constants define the supported types of joints used to constrain motion between rigid bodies.
They are defined in newton.core.types
and used when constructing models.
Constant |
Description |
---|---|
|
Allows translation along a single axis (prismatic joint). |
|
Allows rotation around a single axis (revolute/hinge joint). |
|
Allows rotation in all directions around a point (ball joint). |
|
Prevents all relative motion (fixed joint). |
|
Allows full freedom (no constraints between bodies). |
|
A compound joint made from multiple constraints. |
|
Allows two rotational degrees of freedom (universal joint). |
|
Constrains two points to a fixed distance (distance joint). |
|
6-DoF joint with configurable limits per axis. |
Particle Flags#
These flags indicate special states or behaviors for particles in Newton simulations.
They are defined in newton.core.types
and can be used to tag or filter particles.
Constant |
Description |
---|---|
|
The particle is active and should be simulated. |
Shape Flags#
These flags control rendering and collision behavior for shapes in Newton simulations.
They are defined in newton.core.types
and can be bitwise ORd together to configure shape behavior.
Constant |
Description |
---|---|
|
Shape is visible in rendering. |
|
Enables collision with other shapes. |
|
Enables collision with ground planes or static terrain. |
Update Flags#
These bitmask flags are used with newton.solvers.SolverBase.notify_model_changed()
to inform a solver which parts
of a newton.Model
were modified after the solver was created. Individual solver implementations
are responsible for interpreting these flags and updating any internal data structures from the model as required.
Constant |
Description |
---|---|
|
Joint transforms or coordinates have changed. |
|
Joint axis limits, targets, or modes have changed. |
|
Joint DOF state or force buffers have changed. |
|
Rigid-body pose or velocity buffers have changed. |
|
Rigid-body mass or inertia tensors have changed. |
|
Shape transforms or geometry have changed. |