#collision-detection #collision #convex #ray #distance #geometry

unmaintained ncollide2d

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

39 unstable releases

0.33.0 Mar 18, 2022
0.32.0 Aug 8, 2021
0.31.0 Jul 11, 2021
0.28.0 Mar 1, 2021
0.17.1 Jul 28, 2018

#20 in #ray

Download history 1043/week @ 2023-12-13 1328/week @ 2023-12-20 1297/week @ 2023-12-27 756/week @ 2024-01-03 1283/week @ 2024-01-10 1168/week @ 2024-01-17 1011/week @ 2024-01-24 839/week @ 2024-01-31 805/week @ 2024-02-07 1074/week @ 2024-02-14 1206/week @ 2024-02-21 987/week @ 2024-02-28 1790/week @ 2024-03-06 1628/week @ 2024-03-13 1374/week @ 2024-03-20 1170/week @ 2024-03-27

6,071 downloads per month
Used in 13 crates (9 directly)

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

~5MB
~100K SLoC