Click or drag to resize
DigitalRuneRayTriangleMeshAlgorithmGetTimeOfImpact Method
Gets the time of impact between two moving objects.

Namespace: DigitalRune.Geometry.Collisions.Algorithms
Assembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax
public override float GetTimeOfImpact(
	CollisionObject objectA,
	Pose targetPoseA,
	CollisionObject objectB,
	Pose targetPoseB,
	float allowedPenetration
)

Parameters

objectA
Type: DigitalRune.Geometry.CollisionsCollisionObject
The object A.
targetPoseA
Type: DigitalRune.GeometryPose
The target pose of A.
objectB
Type: DigitalRune.Geometry.CollisionsCollisionObject
The object B.
targetPoseB
Type: DigitalRune.GeometryPose
The target pose of B.
allowedPenetration
Type: SystemSingle
The allowed penetration. A positive allowed penetration value makes sure that the objects have a measurable contact at the time of impact.

Return Value

Type: Single
The time of impact in the range [0, 1].
Exceptions
ExceptionCondition
ArgumentNullExceptionobjectA or objectB is .
Remarks

Both objects are moved from their current pose (time = 0) to the given target pose (time = 1). If they collide during this movement the first time of impact is returned. A time of impact of 1 can mean that the objects do not collide or they collide at their target positions.

The result is undefined if the objects are already in contact at their start poses.

Notes to Inheritors: The base implementation already computes the time of impact for convex shapes. For other shapes it returns 1. Optimized versions should be implemented in derived classes.

See Also