| ContactHelperCreateContact Method (CollisionObject, CollisionObject, Vector3F, Vector3F, Single, Boolean) |
Creates a new
Contact for the given pair of collision objects.
Namespace: DigitalRune.Geometry.CollisionsAssembly: 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
)
Public Shared Function CreateContact (
objectA As CollisionObject,
objectB As CollisionObject,
position As Vector3F,
normal As Vector3F,
penetrationDepth As Single,
isRayHit As Boolean
) As Contact
public:
static Contact^ CreateContact(
CollisionObject^ objectA,
CollisionObject^ objectB,
Vector3F position,
Vector3F normal,
float penetrationDepth,
bool isRayHit
)
static member CreateContact :
objectA : CollisionObject *
objectB : CollisionObject *
position : Vector3F *
normal : Vector3F *
penetrationDepth : float32 *
isRayHit : bool -> Contact
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:
ContactA 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