Click or drag to resize
DigitalRuneCollisionObject Class
Represents an object which can collide with other objects.
Inheritance Hierarchy
SystemObject
  DigitalRune.Geometry.CollisionsCollisionObject

Namespace: DigitalRune.Geometry.Collisions
Assembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax
public class CollisionObject

The CollisionObject type exposes the following members.

Constructors
  NameDescription
Public methodCollisionObject
Initializes a new instance of the CollisionObject class with the given geometric object.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a String that represents the current Object.
(Overrides ObjectToString.)
Top
Properties
  NameDescription
Public propertyCollisionGroup
Gets or sets the collision group ID.
Public propertyDomain
Gets the Domain.
Public propertyEnabled
Gets or sets a value indicating whether this CollisionObject is enabled.
Public propertyGeometricObject
Gets or sets the geometric object.
Public propertyType
Gets or sets the collision object type.
Top
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 which unregisters the event handlers. This is necessary in order to avoid potential memory leaks.

See Also