#collision-detection #collision #convex #geometry #ray #distance #2d-3d

ncollide2d-updated

2 and 3-dimensional collision detection library in Rust. Will be superseded by the parry2d crate.

3 unstable releases

0.36.3 Aug 5, 2024
0.36.2 Aug 4, 2024
0.36.1 Aug 4, 2024
0.36.0 Aug 4, 2024
0.35.0 Aug 31, 2023

#652 in Algorithms

Download history 49/week @ 2024-08-19 24/week @ 2024-08-26 20/week @ 2024-09-02 23/week @ 2024-09-09 97/week @ 2024-09-16 56/week @ 2024-09-23 61/week @ 2024-09-30 69/week @ 2024-10-07 71/week @ 2024-10-14 125/week @ 2024-10-21 162/week @ 2024-10-28 86/week @ 2024-11-04 101/week @ 2024-11-11 77/week @ 2024-11-18 119/week @ 2024-11-25 233/week @ 2024-12-02

536 downloads per month

Apache-2.0

1MB
25K SLoC

Build status

2D Documentation | 3D Documentation | User Guide | Forum

⚠️This crate is now passively-maintained. It is being superseded by the Parry project.⚠️

ncollide

ncollide is a 2 and 3-dimensional collision detection library written with the rust programming language.

The official user guide is available here. The rustdoc documentation is available for 3D and for 2D.

Compilation

You will need the last stable build of the rust compiler and the official package manager: cargo.

Simply add one the following (or both) to your Cargo.toml file:

[dependencies]
ncollide2d = "0.33" # For 2D collision detection.
ncollide3d = "0.33" # For 3D collision detection.

Features

  • dynamic bounding volume tree based broad phase
  • ball vs. ball collision detection,
  • plane vs. any convex object collision detection.
  • collision detection between arbitrary convex objects
  • compound geometries
  • ray-casting
  • time of impact computation for objects without rotational movement (compound vs. compound is not yet implemented)

And various traits for collision detectors and broad phase collision detection.

Dependencies

~5.5MB
~100K SLoC