Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR modifies many names related to shape-casting. It also adds the ability to specify a target distance for (linear) shape-casting.
TOI
toShapeCastHit
.TOIStatus
toShapeCastStatus
.RayIntersection::toi
toRayIntersection::time_of_impact
.toi
have been replaced bytime_of_impact
for better clarity.
query::time_of_impact
toquery::cast_shapes
. More generally, all thefunctions prefixed with
time_of_impact_
(e.g.time_of_impact_ball_ball
) arenow prefixed with
cast_shapes_
(e.g.cast_shapes_ball_ball
).QueryDispatcher::time_of_impact
toQueryDispatcher::cast_shapes
.query::cast_shapes
(previously namedquery::time_of_impact) now take a
ShapeCastOptionsinstead of the
max_toiand
stop_at_penetrationarguments. This
ShapeCastOptionsincludes two new options:
ShapeCastOptions::target_distancewhich will return a hit as soon as the moving shapes are closer than this distance; and
compute_impact_geometry_on_penetrationwhich forces the calculation of proper witness points and normals even if the shapes are initially intersecting (
toi == 0.0,
time_of_impact == 0.0`).query::nonlinear_time_of_impact
toquery::cast_shapes_nonlinear
.QueryDispatcher::nonlinear_time_of_impact
toQueryDispatcher::cast_sahpes_nonlinear
.NonlinearTOIMode
toNonlinearShapeCastMode
, andNonlinearTOIMode::DirectionalTOI
toNonlinearShapeCastMode::Directional
.TimeOfImpactStatus::Penetrating
toShapeCastStatus::PenetratingOrWithinTargetDist
.