CollisionObject Class |
Namespace: DigitalRune.Geometry.Collisions
The CollisionObject type exposes the following members.
Name | Description | |
---|---|---|
CollisionObject |
Initializes a new instance of the CollisionObject class with the given
geometric object.
|
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.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | (Overrides ObjectToString.) |
Name | Description | |
---|---|---|
CollisionGroup |
Gets or sets the collision group ID.
| |
Domain |
Gets the Domain.
| |
Enabled |
Gets or sets a value indicating whether this CollisionObject is enabled.
| |
GeometricObject |
Gets or sets the geometric object.
| |
Type |
Gets or sets the collision object type.
|
A CollisionObject contains an IGeometricObject and adds information for the collision detection system.
The CollisionDetection provides methods to can make collision queries between two CollisionObjects. When collisions between multiple CollisionObjects need to be computed, it is more efficient to manage CollisionObjects in a CollisionDomain. A collision domain will cache data to speed up collision detection. A CollisionObject can only belong to one CollisionDomain at a time.
Important: A CollisionObject registers event handlers for PoseChanged and ShapeChanged of the contained IGeometricObject. Therefore, an IGeometricObject will have an indirect reference to its CollisionObject. When the CollisionObject is no longer used the property GeometricObject should be set to which unregisters the event handlers. This is necessary in order to avoid potential memory leaks.