ContactSetHaveContact Property |
Namespace: DigitalRune.Geometry.Collisions
Normally, if this value is , the ContactSet contains one or more Contacts that indicate that the objects are touching or intersecting. Two objects are touching or intersecting when the PenetrationDepth of Contact is equal to or greater than 0.
When HaveContact is the ContactSet contains no Contact - except when the ContactSet is created by a closest point query. A closest-point query (see GetClosestPoints(CollisionObject, CollisionObject) or UpdateClosestPoints(ContactSet, Single)) returns a ContactSet that has a single Contact where the PenetrationDepth indicates the closest-point distance. (When the PenetrationDepth is negative then the two objects are separated and the absolute value of the PenetrationDepth is the distance between the closest points. When PenetrationDepth is 0 the objects are touching and when the PenetrationDepth is positive the objects are intersecting.)
In certain cases HaveContact is , but the ContactSet is empty and does not contain any Contacts. This is the case if either ObjectA or ObjectB is a trigger (CollisionObjectType) or if no useful contact information could be computed because of numerical errors or other exceptions.