rhusics_core/
collide3d.rs

1//! Type wrappers and convenience functions for 3D collision detection
2
3pub use collision::algorithm::minkowski::GJK3;
4pub use collision::primitive::{ConvexPolyhedron, Cuboid, Particle3, Sphere};
5
6use cgmath::{Point3, Quaternion};
7use collision::algorithm::broad_phase::BruteForce;
8use collision::primitive::Primitive3;
9use collision::Aabb3;
10
11use collide::*;
12use BodyPose;
13
14/// Collision shape for 3D, see [`CollisionShape`](../collide/struct.CollisionShape.html) for more
15/// information
16///
17/// ### Type parameters:
18///
19/// - `S`: Scalar type (f32 or f64)
20/// - `T`: Transform
21/// - `Y`: Collider type, see `Collider` for more information
22pub type CollisionShape3<S, T, Y = ()> = CollisionShape<Primitive3<S>, T, Aabb3<S>, Y>;
23
24/// Broad phase brute force algorithm for 3D, see
25/// [`BruteForce`](../collide/broad/struct.BruteForce.html) for more information.
26pub type BroadBruteForce3 = BruteForce;
27
28/// Broad phase sweep and prune algorithm
29///
30/// ### Type parameters:
31///
32/// - `S`: Scalar type (f32 or f64)
33pub type SweepAndPrune3<S> = ::collision::algorithm::broad_phase::SweepAndPrune3<S, Aabb3<S>>;
34
35/// Body pose transform for 3D, see [`BodyPose`](../struct.BodyPose.html) for more information.
36///
37/// ### Type parameters:
38///
39/// - `S`: Scalar type (f32 or f64)
40pub type BodyPose3<S> = BodyPose<Point3<S>, Quaternion<S>>;