Assembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.9.0.0 (1.9.3.9490)
Syntax
| C# |
|---|
public class CollisionDomain |
| Visual Basic |
|---|
Public Class CollisionDomain |
| Visual C++ |
|---|
public ref class CollisionDomain |
Remarks
The CollisionDetection can be used for ad hoc collision queries between any two objects. The CollisionDomain is designed to manage multiple collision objects at once and allows faster contact queries.
The method Update(Single) must be called in each frame (time step) to update the collision domain. Update(Single) computes all collisions between all objects inside the domain. The resulting contacts are stored in ContactSets. The collision domain reuses collision data from the last frame. Additionally, if the property EnableMultithreading is set, the workload is distributed across multiple CPU cores. Therefore the collision computation is much faster in comparison to ad hoc queries (as in CollisionDetection).
A CollisionDomain can only compute real contacts (geometric objects are touching or intersecting), but it does not calculate closest-point queries for separated objects. Use CollisionDetection to calculate the closest-point queries.