Crate rhusics_core [−] [src]
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
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
BodyPose |
Transform component used throughout the library |
BruteForce |
Broad phase collision detection brute force implementation. |
CollisionShape |
Collision shape describing a complete collision object in the collision world. |
Contact |
Contact manifold for a single collision contact point. |
ContactEvent |
Contains all contact information for a single contact, together with IDs of the colliding bodies |
ForceAccumulator |
Force accumulator for a rigid body. |
Mass |
Mass |
Material |
Physics material |
NextFrame |
Wrapper for data computed for the next frame |
ResolveData |
Data used for contact resolution |
RigidBody |
Rigid body |
SingleChangeSet |
Changes computed from contact resolution. |
Velocity |
Velocity |
Enums
CollisionMode |
Control continuous mode for shapes |
CollisionStrategy |
Collision strategy to use for collisions. |
Traits
ApplyAngular |
Apply an angular velocity to a rotational quantity |
BroadPhase |
Broad phase |
Collider |
Used to check if two shapes should be checked for collisions |
CollisionData |
Collision data used for performing a full broad + narrow phase |
GetId |
Trait used to extract the lookup id used by |
Inertia |
Moment of inertia, used for abstracting over 2D/3D inertia tensors |
NarrowPhase |
Base trait implemented by all narrow phase algorithms. |
PartialCrossProduct |
Cross product abstraction |
PhysicsTime | |
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 Definitions
SweepAndPrune2 |
Broad phase sweep and prune algorithm for 2D, see SweepAndPrune for more information. |
SweepAndPrune3 |
Broad phase sweep and prune algorithm for 3D, see SweepAndPrune for more information. |