parry3d 0.26.0

3 dimensional collision detection library in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use parry3d::math::Vector;
use parry3d::shape::ConvexPolyhedron;

fn main() {
    let points = [
        Vector::new(0.0f32, 0.0, 1.0),
        Vector::new(0.0, 0.0, -1.0),
        Vector::new(0.0, 1.0, 0.0),
        Vector::new(0.0, -1.0, 0.0),
        Vector::new(1.0, 0.0, 0.0),
        Vector::new(-1.0, 0.0, 0.0),
        Vector::ZERO,
    ];

    let convex = ConvexPolyhedron::from_convex_hull(&points).expect("Invalid convex shape.");
    convex.check_geometry();
}