Expand description
Companion library to cgmath, dealing with collision detection centric data structures and algorithms.
This crate provides useful data structures and algorithms for doing collision detection. It is organized into a few distinct parts: generic geometry (ray, line, plane, frustum etc), bounding volumes (AABB, OBB, Sphere etc), collision primitives and algorithms used for collision detection, distance computation etc.
Modules§
- algorithm
- Collision detection algorithms
- dbvt
- A dynamic bounding volume tree implementation, index based (not pointer based).
- prelude
- Prelude provides all the traits of the library in a convenient form
- primitive
- Collision primitives
Structs§
- Aabb2
- A two-dimensional AABB, aka a rectangle.
- Aabb3
- A three-dimensional AABB, aka a rectangular prism.
- Contact
- Contact manifold for a single collision contact point.
- Cylinder
- Bounding cylinder
- Frustum
- View frustum, used for frustum culling
- Frustum
Points - View frustum corner points
- Line
- A generic directed line segment from
origin
todest
. - Obb
- Generic object bounding box, centered on
center
, aligned withaxis
, and with sizeextents
. - Plane
- A 3-dimensional plane formed from the equation:
A*x + B*y + C*z - D = 0
. - Ray
- A generic ray starting at
origin
and extending infinitely indirection
. - Sphere
- Bounding sphere.
Enums§
- Collision
Strategy - Collision strategy to use for collisions.
- Relation
- Spatial relation between two objects.
Traits§
- Aabb
- Base trait describing an axis aligned bounding box.
- Bound
- Bounding volume abstraction for use with algorithms
- Compute
Bound - Utilities for computing bounding volumes of primitives
- Contains
- Boolean containment test.
- Continuous
- An intersection test with a result.
- Continuous
Transformed - Continuous intersection test on transformed primitive
- Discrete
- A boolean intersection test.
- Discrete
Transformed - Discrete intersection test on transformed primitive
- HasBound
- Primitive with bounding volume
- Interpolate
- Trait used for interpolation of values
- MinMax
- Compute the minimum/maximum of the given values
- Plane
Bound - Generic 3D bound.
- Primitive
- Minkowski support function for primitive
- Projection
- Conversion trait for converting cgmath projection types into a view frustum
- Surface
Area - Shape surface area
- Translation
Interpolate - Trait used for interpolation of translation only in transforms
- Union
- Build the union of two shapes.