#gamedev #cgmath #collision

collision

A collision extension to cgmath

23 releases (breaking)

✓ Uses Rust 2018 edition

0.20.1 Apr 4, 2019
0.19.0 Jan 12, 2019
0.18.0 May 13, 2018
0.15.0 Mar 13, 2018
0.0.5 Mar 5, 2015

#6 in Game development

Download history 215/week @ 2018-12-21 57/week @ 2018-12-28 119/week @ 2019-01-04 351/week @ 2019-01-11 246/week @ 2019-01-18 292/week @ 2019-01-25 253/week @ 2019-02-01 219/week @ 2019-02-08 243/week @ 2019-02-15 200/week @ 2019-02-22 228/week @ 2019-03-01 143/week @ 2019-03-08 124/week @ 2019-03-15 239/week @ 2019-03-22 85/week @ 2019-03-29

919 downloads per month
Used in 10 crates (9 directly)

Apache-2.0

325KB
8K SLoC

collision-rs

Build Status Documentation Version License Downloads Join the chat

This library is an extension of cgmath that provides collision detection primitives, bounding volumes and collision detection algorithms.

The library provides:

  • a generic ray: Ray
  • a plane type: Plane
  • a view frustum: Frustum
  • axis-aligned bounding boxes: Aabb2, Aabb3
  • oriented bounding boxes: Obb2, Obb3
  • additional bounding volumes: Sphere, Cylinder
  • collision primitives: Sphere, Circle, Rectangle, Cuboid, Particle, Convex Polygon, Convex Polyhedra
  • a dynamic bounding volume tree (DBVT)
  • broad phase collision detection: Brute Force, Sweep and Prune
  • discrete narrow phase collision detection: GJK (including EPA for manifold computation)
  • continuous narrow phase collision detection: GJK
  • convex shape distance computation: GJK

Not all of the functionality has been implemented yet, and the existing code is not fully covered by the testsuite. If you encounter any mistakes or omissions please let us know by posting an issue, or even better: send us a pull request with a fix.

License

Licensed under either of

at your option.

Contributing

Use CONTRIBUTING.md for futher information.

Pull requests are most welcome, especially in the realm of performance enhancements and fixing any mistakes. Unit tests and benchmarks are also required, so help on that front would be most appreciated.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~2MB
~27K SLoC