Crate rhusics_ecs

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 implementation BodyPose 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 physics ECS
physics3d
3D physics ECS

Structs§

BasicCollisionSystem
Collision detection system for use with specs.
ContactResolutionSystem
Do single contact, forward resolution.
CurrentFrameUpdateSystem
Current frame update system.
DeltaTime
Time step resource
NextFrameSetupSystem
Setup the next frames positions and velocities.
PhysicalEntityParts
SystemData for easier creation of physical entities.
SpatialCollisionSystem
Collision detection system for use with specs.
SpatialSortingSystem
Spatial sorting system for use with specs.

Enums§

PhysicalEntityCreationError
Error returned when physical entity setup fails

Traits§

WithPhysics
Adds physical entity builder functions to EntityBuilder

Functions§

setup_dispatch
Create systems and add to a Dispatcher graph.