Crate rhusics_core
source ·Expand description
Rhusics physics library
A physics library.
Uses cgmath
for all computation.
Features:
- Two different broad phase collision detection implementations:
- Brute force
- Sweep and Prune
- Narrow phase collision detection using GJK, and optionally EPA for full contact information
- Functions for collision detection working on user supplied transform, and
CollisionShape
components. Can optionally use broad and/or narrow phase detection. Library supplies a transform implementationBodyPose
for convenience. - Uses single precision as default, can be changed to double precision with the
double
feature. - Has support for doing spatial sort/collision detection using the collision-rs DBVT.
- Support for doing broad phase using the collision-rs DBVT.
- Has support for all primitives in collision-rs
Modules
Type wrappers and convenience functions for 2D collision detection
Type wrappers and convenience functions for 3D collision detection
2D structures for physics
3D structures for physics
Structs
Transform component used throughout the library
Broad phase collision detection brute force implementation.
Collision shape describing a complete collision object in the collision world.
Contact manifold for a single collision contact point.
Contains all contact information for a single contact, together with IDs of the colliding bodies
Force accumulator for a physical entity.
Mass
Physics material
Wrapper for data computed for the next frame
Physical entity
Data used for contact resolution
Changes computed from contact resolution.
Velocity
Global parameters for the physics world
Enums
Control continuous mode for shapes
Collision strategy to use for collisions.
Traits
Apply an angular velocity to a rotational quantity
Broad phase
Used to check if two shapes should be checked for collisions
Collision data used for performing a full broad + narrow phase
Trait used to extract the lookup id used by
CollisionData
, given the output from a broad phaseMoment of inertia, used for abstracting over 2D/3D inertia tensors
Base trait implemented by all narrow phase algorithms.
Cross product abstraction
Pose abstraction
Minkowski support function for primitive
Describe a shape with volume
Functions
Do basic collision detection (not using a DBVT)
Do force integration for next frame.
Compute next frame pose
Perform contact resolution.
Do collision detection using a DBVT
Type Definitions
Broad phase sweep and prune algorithm for 2D, see
SweepAndPrune for more information.
Broad phase sweep and prune algorithm for 3D, see
SweepAndPrune for more information.