MCPcopy Index your code
hub / github.com/dimforge/ncollide

github.com/dimforge/ncollide @v0.33.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.33.0 ↗ · + Follow
1,475 symbols 3,638 edges 262 files 541 documented · 37% updated 3y ago★ 93269 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<a href="https://discord.gg/vt9DJSW">
    <img src="https://img.shields.io/discord/507548572338880513.svg?logo=discord&colorB=7289DA">
</a>
<a href="https://crates.io/crates/ncollide2d">
     <img src="http://meritbadge.herokuapp.com/ncollide2d?style=flat-square" alt="crates.io">
</a>
<a href="https://crates.io/crates/ncollide3d">
     <img src="http://meritbadge.herokuapp.com/ncollide3d?style=flat-square" alt="crates.io">
</a>
<a href="https://circleci.com/gh/dimforge/ncollide">
    <img src="https://circleci.com/gh/dimforge/ncollide.svg?style=svg" alt="Build status">
</a>






<strong>
    <a href="http://ncollide.org/rustdoc/ncollide2d">2D Documentation</a> | <a href="http://ncollide.org/rustdoc/ncollide3d">3D Documentation</a> | <a href="http://ncollide.org">User Guide</a> | <a href="https://discourse.nphysics.org">Forum</a>
</strong>

⚠️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.

Extension points exported contracts — how you extend this code

RayCast (Interface)
Traits of objects which can be transformed and tested for intersection with a ray. [20 implementers]
src/query/ray/ray.rs
ToTriMesh (Interface)
Trait implemented by shapes that can be approximated by a triangle mesh. [8 implementers]
src/transformation/to_trimesh/to_trimesh.rs
RigidMotion (Interface)
A continuous rigid motion. This is a function, assumed to be continuous, that, given a parameter `t` returns a direct i [6 …
src/interpolation/rigid_motion.rs
SupportMap (Interface)
Traits of convex shapes representable by a support mapping function. # Parameters: V - type of the support mapping dire [12 …
src/shape/support_map.rs
ContactManifoldGenerator (Interface)
An algorithm to compute contact points, normals and penetration depths between two specific objects. [11 implementers]
src/pipeline/narrow_phase/contact_generator/contact_manifold_generator.rs
HasBoundingVolume (Interface)
Traits of objects having a bounding volume. [31 implementers]
src/bounding_volume/bounding_volume.rs
BestFirstVisitor (Interface)
Trait implemented by cost functions used by the best-first search on a `BVT`. [16 implementers]
src/partitioning/visitor.rs
IsometryOps (Interface)
Extra operations with isometries. [2 implementers]
src/utils/isometry_ops.rs

Core symbols most depended-on inside this repo

len
called by 166
src/pipeline/narrow_phase/events.rs
push
called by 161
src/pipeline/narrow_phase/events.rs
unwrap
called by 118
src/procedural/polyline.rs
clone
called by 93
src/pipeline/narrow_phase/proximity_detector/ball_ball_proximity_detector.rs
iter
called by 87
src/pipeline/narrow_phase/events.rs
push
called by 67
src/shape/convex_polygonal_feature3.rs
as_ref
called by 63
src/shape/shape.rs
len
called by 47
src/procedural/vec_slice.rs

Shape

Method 1,060
Function 188
Class 161
Interface 36
Enum 30

Languages

Rust100%

Modules by API surface

src/shape/trimesh.rs51 symbols
src/pipeline/object/collision_groups.rs41 symbols
src/shape/polyline.rs40 symbols
src/pipeline/world.rs40 symbols
src/pipeline/object/collision_object.rs32 symbols
src/shape/heightfield3.rs30 symbols
src/shape/shape.rs27 symbols
src/pipeline/narrow_phase/interaction_graph.rs26 symbols
src/shape/triangle.rs25 symbols
src/shape/segment.rs24 symbols
src/pipeline/object/collision_object_set.rs24 symbols
src/partitioning/bvt.rs24 symbols

For agents

$ claude mcp add ncollide \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact