Click or drag to resize
DigitalRuneContactHelperCreateContact Method (CollisionObject, CollisionObject, Vector3F, Vector3F, Single, Boolean)
Creates a new Contact for the given pair of collision objects.

Namespace: DigitalRune.Geometry.Collisions
Assembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax
public static Contact CreateContact(
	CollisionObject objectA,
	CollisionObject objectB,
	Vector3F position,
	Vector3F normal,
	float penetrationDepth,
	bool isRayHit
)

Parameters

objectA
Type: DigitalRune.Geometry.CollisionsCollisionObject
The first collision object. (Must not be .)
objectB
Type: DigitalRune.Geometry.CollisionsCollisionObject
The second collision object. (Must not be .)
position
Type: DigitalRune.Mathematics.AlgebraVector3F
The contact position.
normal
Type: DigitalRune.Mathematics.AlgebraVector3F
The normal vector. Needs to be normalized.
penetrationDepth
Type: SystemSingle
The penetration depth.
isRayHit
Type: SystemBoolean
If set to the contact is a hit by a ray (see IsRayHit).

Return Value

Type: Contact
A new Contact.
Remarks
This method copies the given information into a new contact and initializes the local contact positions (PositionALocal and PositionBLocal). objectA and objectB are only used to compute the local contact positions.
See Also