Click or drag to resize
DigitalRuneContactPenetrationDepth Property
Gets or sets the penetration depth.

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

Property Value

Type: Single
The penetration depth.
Remarks

This is the distance which the two object have to move along the contact normal (see Normal) to be in a touching state (no penetration and no separation). For penetrating contacts this value is positive. For separated objects this value is negative. (The "penetration depth" is the inverse of the "separation distance".)

For ray-casting: If this value is positive, the ray hits the object and the PenetrationDepth is the distance from the origin of the ray origin to the contact point. If the value is negative the ray misses the object and the absolute value of the PenetrationDepth indicates the separation distance between the ray and the other object (closest points).

See Also