CollisionDomain Class |
Namespace: DigitalRune.Geometry.Collisions
The CollisionDomain type exposes the following members.
Name | Description | |
---|---|---|
CollisionDomain |
Initializes a new instance of the CollisionDomain class.
| |
CollisionDomain(CollisionDetection) |
Initializes a new instance of the CollisionDomain class.
|
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetContactObjects |
Gets all CollisionObjects that have contact with the given object.
| |
GetContacts(CollisionObject) |
Gets all contacts of the given CollisionObject.
| |
GetContacts(CollisionObject, CollisionObject) |
Gets the contacts for the given CollisionObject pair.
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
HasContact |
Determines whether the specified collision object has contact with any other object in the
domain.
| |
HaveContact |
Determines whether two CollisionObjects have contact.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | (Overrides ObjectToString.) | |
Update(Single) |
Updates the collision domain and computes the new contact information.
| |
Update(TimeSpan) |
Updates the collision domain and computes the new contact information.
| |
Update(CollisionObject) |
Updates the collision domain and computes the new contact information for a given collision
object.
| |
Update(Single, Boolean) |
Updates the collision domain and computes the new contact information.
|
Name | Description | |
---|---|---|
BroadPhase |
Gets or sets the ISpatialPartitionT that is used for the broad phase of
the collision detection.
| |
CollisionDetection |
Gets the collision detection service.
| |
CollisionObjects |
Gets a collection of collision objects that are managed in this collision domain.
| |
ContactSets |
Gets a collection with all contacts found in the collision domain.
| |
EnableMultithreading |
Gets or sets a value indicating whether multithreading is enabled.
| |
NumberOfBroadPhaseOverlaps |
Gets the number of AABB overlaps in the broad phase.
|
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.