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::Polyline;

fn main() {
    let points = vec![
        Vector::new(0.0, 1.0, 0.0),
        Vector::new(-1.0, -1.0, 1.0),
        Vector::new(0.0, -0.5, 0.0),
        Vector::new(1.0, -1.0, -1.0),
        Vector::new(0.0, 1.0, 0.0), // This forms a loop.
    ];

    // Build the polyline.
    let polyline = Polyline::new(points, None);

    assert!(polyline.vertices().len() == 5);
}