PlaneSphereAlgorithmComputeCollision Method |
Namespace: DigitalRune.Geometry.Collisions.Algorithms
public override void ComputeCollision( ContactSet contactSet, CollisionQueryType type )
Exception | Condition |
---|---|
ArgumentException | contactSet does not contain a PlaneShape and SphereShape. |
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.