Crate collision [−] [src]
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 |
FrustumPoints |
View frustum corner points |
Line |
A generic directed line segment from |
Obb |
Generic object bounding box, centered on |
Plane |
A 3-dimensional plane formed from the equation: |
Ray |
A generic ray starting at |
Sphere |
Bounding sphere. |
Enums
CollisionStrategy |
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 |
ComputeBound |
Utilities for computing bounding volumes of primitives |
Contains |
Boolean containment test. |
Continuous |
An intersection test with a result. |
ContinuousTransformed |
Continuous intersection test on transformed primitive |
Discrete |
A boolean intersection test. |
DiscreteTransformed |
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 |
PlaneBound |
Generic 3D bound. |
Primitive |
Minkowski support function for primitive |
Projection |
Conversion trait for converting cgmath projection types into a view frustum |
SurfaceArea |
Shape surface area |
TranslationInterpolate |
Trait used for interpolation of translation only in transforms |
Union |
Build the union of two shapes. |
Type Definitions
Line2 |
2D directed line segment |
Line3 |
3D directed line segment |
Obb2 |
2D object bounding box |
Obb3 |
3D object bounding box |
Ray2 |
2D ray |
Ray3 |
3D ray |