Expand description
High-level physics world API designed for Python consumers.
PyPhysicsWorld provides the primary interface: add/remove bodies, apply
forces and impulses, step the simulation, and query state. Handles are
u32 integers for easy FFI transmission. All state uses plain arrays and
primitive types; no nalgebra types are exposed through the public API.
Structs§
- Contact
Pair - Contact pair returned by
get_contact_list. - FemBar
Element - A single 2-node bar (truss) element for FEM assembly.
- Inertia
Tensor - Inertia tensor (3×3 matrix stored as 9 elements, row-major).
- Material
Properties - Material property record returned by query functions.
- PyAabb
- Axis-aligned bounding box (AABB) in 3-D.
- PyConstraint
- A constraint between two rigid bodies.
- PyConvex
Hull - A convex hull stored as a list of vertices.
- PyFem
Assembly - FEM assembly for a truss structure.
- PyFem
Binding - PyO3-style binding handle for a 2-D FEM solver.
- PyLbm
Binding - PyO3-style binding handle for a 2-D LBM simulation.
- PyLbm
Config - Configuration for a 2-D D2Q9 Lattice-Boltzmann simulation.
- PyLbm
Grid - D2Q9 Lattice-Boltzmann grid simulation.
- PyMaterial
- A material definition holding both elastic and optional plastic properties.
- PyMd
Binding - PyO3-style binding handle for an MD simulation.
- PyPhysics
World - A self-contained physics simulation world.
- PyRigid
Body PyRigidBodyis a lightweight handle-based wrapper that exposes body-level computations (moment of inertia, etc.) without owning state.- PySph
Binding - PyO3-style binding handle for a 3-D SPH simulation.
- PySph
Config - Configuration for an SPH particle simulation.
- PySph
Sim - SPH particle simulation (simplified 3-D, poly6/spiky kernels).
- PySphere
- Sphere geometry query helper.
- SimStats
- Per-step simulation performance and state statistics.
Enums§
- Constraint
Type - Type of constraint between two bodies.
- Material
Class - Classification of material behaviour.
Functions§
- array_
to_ vec3 - Convert a
[f64; 3]array toPyVec3. - py_
p_ wave_ speed - PyO3-callable: return P-wave speed for a named material, or
0.0. - py_
query_ material - PyO3-callable: look up a material and return
[density, E, nu, UTS, visc, yield]or an empty vec if the name is unknown. - py_
s_ wave_ speed - PyO3-callable: return S-wave speed for a named material, or
0.0. - quat_
conjugate - Conjugate (inverse for unit quaternion) of
[x, y, z, w]. - quat_
from_ axis_ angle - Create a quaternion from an axis-angle representation.
- quat_
mul - Multiply two quaternions q1 * q2 (Hamilton product).
- quat_
normalize - Normalize a quaternion
[x, y, z, w]and return it. - quat_
rotate_ vec - Rotate a vector
vby unit quaternionq. - vec3_
to_ array - Convert
PyVec3to a[f64; 3]array.