| ContactHelperCreateContact Method (ContactSet, Vector3F, Vector3F, Single, Boolean) |
Creates a new
Contact for the given contact set.
Namespace: DigitalRune.Geometry.CollisionsAssembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax public static Contact CreateContact(
ContactSet contactSet,
Vector3F position,
Vector3F normal,
float penetrationDepth,
bool isRayHit
)
Public Shared Function CreateContact (
contactSet As ContactSet,
position As Vector3F,
normal As Vector3F,
penetrationDepth As Single,
isRayHit As Boolean
) As Contact
public:
static Contact^ CreateContact(
ContactSet^ contactSet,
Vector3F position,
Vector3F normal,
float penetrationDepth,
bool isRayHit
)
static member CreateContact :
contactSet : ContactSet *
position : Vector3F *
normal : Vector3F *
penetrationDepth : float32 *
isRayHit : bool -> Contact
Parameters
- contactSet
- Type: DigitalRune.Geometry.CollisionsContactSet
The contact set for the colliding objects. (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:
ContactA new
Contact.
Remarks
This method copies the given information into a new contact and initializes the local
contact positions (
PositionALocal and
PositionBLocal). The
contactSet is only required
to compute the local contact positions.
See Also