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
CollisionShapecomponents. Can optionally use broad and/or narrow phase detection. Library supplies a transform implementationBodyPosefor convenience. - Uses single precision as default, can be changed to double precision with the
doublefeature. - 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§
- collide2d
- Type wrappers and convenience functions for 2D collision detection
- collide3d
- Type wrappers and convenience functions for 3D collision detection
- physics2d
- 2D structures for physics
- physics3d
- 3D structures for physics
Structs§
- Body
Pose - Transform component used throughout the library
- Brute
Force - Broad phase collision detection brute force implementation.
- Collision
Shape - Collision shape describing a complete collision object in the collision world.
- Contact
- Contact manifold for a single collision contact point.
- Contact
Event - Contains all contact information for a single contact, together with IDs of the colliding bodies
- Force
Accumulator - Force accumulator for a physical entity.
- Mass
- Mass
- Material
- Physics material
- Next
Frame - Wrapper for data computed for the next frame
- Physical
Entity - Physical entity
- Resolve
Data - Data used for contact resolution
- Single
Change Set - Changes computed from contact resolution.
- Velocity
- Velocity
- World
Parameters - Global parameters for the physics world
Enums§
- Collision
Mode - Control continuous mode for shapes
- Collision
Strategy - Collision strategy to use for collisions.
Traits§
- Apply
Angular - Apply an angular velocity to a rotational quantity
- Broad
Phase - Broad phase
- Collider
- Used to check if two shapes should be checked for collisions
- Collision
Data - Collision data used for performing a full broad + narrow phase
- GetId
- Trait used to extract the lookup id used by
CollisionData, given the output from a broad phase - Inertia
- Moment of inertia, used for abstracting over 2D/3D inertia tensors
- Narrow
Phase - Base trait implemented by all narrow phase algorithms.
- Partial
Cross Product - Cross product abstraction
- Physics
Time - Pose
- Pose abstraction
- Primitive
- Minkowski support function for primitive
- Volume
- Describe a shape with volume
Functions§
- basic_
collide - Do basic collision detection (not using a DBVT)
- next_
frame_ integration - Do force integration for next frame.
- next_
frame_ pose - Compute next frame pose
- resolve_
contact - Perform contact resolution.
- tree_
collide - Do collision detection using a DBVT
Type Aliases§
- Sweep
AndPrune2 - Broad phase sweep and prune algorithm for 2D, see SweepAndPrune for more information.
- Sweep
AndPrune3 - Broad phase sweep and prune algorithm for 3D, see SweepAndPrune for more information.