Click or drag to resize
DigitalRuneCollisionDomainHaveContact Method
Determines whether two CollisionObjects have 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(
	CollisionObject objectA,
	CollisionObject objectB
)

Parameters

objectA
Type: DigitalRune.Geometry.CollisionsCollisionObject
The first collision object.
objectB
Type: DigitalRune.Geometry.CollisionsCollisionObject
The second collision object.

Return Value

Type: Boolean
if the objects are touching or penetrating; otherwise if the objects are separated.
Exceptions
ExceptionCondition
ArgumentNullExceptionobjectA or objectB is .
Remarks

If both collision objects are part of this CollisionDomain, then this method checks the currently cached contacts sets (which are stored in ContactSets). The contact sets are only updated, when Update(TimeSpan) is called. If the objects have moved since the collision domain was updated last, the contact information will not be up-to-date. In this case you need to call Update(TimeSpan) again before calling GetContacts(CollisionObject) to get up-to-date results.

If one collision object is not part of this CollisionDomain, then this method automatically calculates the new contact information.

See Also