Click or drag to resize
DigitalRuneContactSetHaveContact Property
Gets or sets a value indicating whether ObjectA and ObjectB are in contact.

Namespace: DigitalRune.Geometry.Collisions
Assembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax
public bool HaveContact { get; set; }

Property Value

Type: Boolean
if ObjectA and ObjectB are touching or intersecting; otherwise, .
Remarks

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.

See Also