Represents an object which can collide with other objects.

Namespace: DigitalRune.Geometry.Collisions
Assembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.9.0.0 (1.9.3.9490)

Syntax

C#
public class CollisionObject
Visual Basic
Public Class CollisionObject
Visual C++
public ref class CollisionObject

Remarks

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 nullNothingnullptra null reference (Nothing in Visual Basic) which unregisters the event handlers. This is necessary in order to avoid potential memory leaks.

Inheritance Hierarchy

System..::..Object
  DigitalRune.Geometry.Collisions..::..CollisionObject

See Also