parry2d 0.26.0

2 dimensional collision detection library in Rust.
Documentation
use parry2d::math::Vector;
use parry2d::shape::Polyline;

fn main() {
    let points = vec![
        Vector::new(0.0, 1.0),
        Vector::new(-1.0, -1.0),
        Vector::new(0.0, -0.5),
        Vector::new(1.0, -1.0),
    ];

    let indices = vec![
        [0, 1],
        [1, 2],
        [2, 3],
        [3, 0], // This forms a loop.
    ];

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

    assert_eq!(polyline.vertices().len(), 4);
}