Click or drag to resize
DigitalRuneCompositeShapeAlgorithmComputeCollision Method
Computes the collision. - This method should only be used by CollisionAlgorithm instances!

Namespace: DigitalRune.Geometry.Collisions.Algorithms
Assembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax
public override void ComputeCollision(
	ContactSet contactSet,
	CollisionQueryType type
)

Parameters

contactSet
Type: DigitalRune.Geometry.CollisionsContactSet
The contact set.
type
Type: DigitalRune.Geometry.CollisionsCollisionQueryType
The type of collision query.
Exceptions
ExceptionCondition
ArgumentExceptioncontactSet does not contain a CompositeShape.
NotSupportedExceptioncontactSet contains a CompositeShape with a non-uniform scaling. One of its children has a local rotation. Computing collisions for composite shapes with non-uniform scaling and rotated children is not supported.
Remarks

This method does the real work. It is called from the other public methods of a CollisionAlgorithm. Also, if one CollisionAlgorithm uses another CollisionAlgorithm internally, this method should be called directly instead of UpdateClosestPoints(ContactSet, Single) or UpdateContacts(ContactSet, Single).

Notes to Inheritors: This is the central method which has to be implemented in derived classes. contactSet is never . This method has to add new contact/closest-point info with Merge(ContactSet, Contact, CollisionQueryType, Single). It is not necessary to remove old contacts. At the beginning of the method HaveContact in contactSet indicates the result of the last narrow phase algorithm that was run on contactSet. This method must set HaveContact to if it doesn't find a contact or to if it finds a contact.

See Also