rhusics_ecs/
lib.rs

1//! # Rhusics physics library
2//!
3//! A physics library.
4//! Uses [`cgmath`](https://github.com/brendanzab/cgmath/) for all computation.
5//!
6//! Features:
7//!
8//! * Two different broad phase collision detection implementations:
9//!   * Brute force
10//!   * Sweep and Prune
11//! * Narrow phase collision detection using GJK, and optionally EPA for full contact information
12//! * Functions for collision detection working on user supplied transform, and
13//!    [`CollisionShape`](collide/struct.CollisionShape.html) components.
14//!    Can optionally use broad and/or narrow phase detection.
15//!    Library supplies a transform implementation [`BodyPose`](struct.BodyPose.html) for
16//!    convenience.
17//! * Uses single precision as default, can be changed to double precision with the `double`
18//!   feature.
19//! * Has support for doing spatial sort/collision detection using the collision-rs DBVT.
20//! * Support for doing broad phase using the collision-rs DBVT.
21//! * Has support for all primitives in collision-rs
22//!
23
24#![deny(
25    missing_docs,
26    trivial_casts,
27    unsafe_code,
28    unstable_features,
29    unused_import_braces,
30    unused_qualifications
31)]
32#![allow(unknown_lints, type_complexity, new_without_default_derive)]
33
34extern crate cgmath;
35extern crate collision;
36#[macro_use]
37extern crate failure;
38extern crate rhusics_core as core;
39extern crate shred;
40extern crate shrev;
41extern crate specs;
42
43#[macro_use]
44extern crate shred_derive;
45
46#[cfg(feature = "serde")]
47#[macro_use]
48extern crate serde;
49
50pub use collide::{BasicCollisionSystem, SpatialCollisionSystem, SpatialSortingSystem};
51pub use physics::{
52    setup_dispatch, ContactResolutionSystem, CurrentFrameUpdateSystem, DeltaTime,
53    NextFrameSetupSystem, PhysicalEntityCreationError, PhysicalEntityParts, WithPhysics,
54};
55
56pub mod collide2d;
57pub mod collide3d;
58pub mod physics2d;
59pub mod physics3d;
60
61mod collide;
62mod physics;