Class TimeOfImpact
java.lang.Object
org.jbox2d.collision.TimeOfImpact
public class TimeOfImpact
extends java.lang.Object
Class used for computing the time of impact. This class should not be constructed usually, just
retrieve from the
.
invalid reference
SingletonPool#getTOI()
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInput parameters for TOIstatic classOutput parameters for TimeOfImpactstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Distance.SimplexCacheprivate final DistanceInputprivate final DistanceOutputprivate final SeparationFunctionprivate final int[]static final intprivate final IWorldPoolprivate final Sweepprivate final Sweepstatic intstatic intstatic intstatic intstatic intprivate final Transformprivate final Transform -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidtimeOfImpact(TimeOfImpact.TOIOutput output, TimeOfImpact.TOIInput input) Compute the upper bound on time before two shapes penetrate.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
MAX_ITERATIONS
public static final int MAX_ITERATIONS- See Also:
-
toiCalls
public static int toiCalls -
toiIters
public static int toiIters -
toiMaxIters
public static int toiMaxIters -
toiRootIters
public static int toiRootIters -
toiMaxRootIters
public static int toiMaxRootIters -
cache
-
distanceInput
-
xfA
-
xfB
-
distanceOutput
-
fcn
-
indexes
private final int[] indexes -
sweepA
-
sweepB
-
pool
-
-
Constructor Details
-
TimeOfImpact
-
-
Method Details
-
timeOfImpact
Compute the upper bound on time before two shapes penetrate. Time is represented as a fraction between [0,tMax]. This uses a swept separating axis and may miss some intermediate, non-tunneling collision. If you change the time interval, you should call this function again. Note: use Distance to compute the contact point and normal at the time of impact.- Parameters:
output-input-
-