Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: shape-cast naming changes #199

Merged
merged 6 commits into from
May 5, 2024
Merged

feat: shape-cast naming changes #199

merged 6 commits into from
May 5, 2024

Conversation

sebcrozet
Copy link
Member

@sebcrozet sebcrozet commented May 5, 2024

This PR modifies many names related to shape-casting. It also adds the ability to specify a target distance for (linear) shape-casting.

  • Renamed TOI to ShapeCastHit.
  • Renamed TOIStatus to ShapeCastStatus.
  • Rename RayIntersection::toi to RayIntersection::time_of_impact.
  • More generally, all occurrences of the word toi have been replaced by time_of_impact
    for better clarity.
  • Rename query::time_of_impact to query::cast_shapes. More generally, all the
    functions prefixed with time_of_impact_ (e.g. time_of_impact_ball_ball) are
    now prefixed with cast_shapes_ (e.g. cast_shapes_ball_ball).
  • Rename QueryDispatcher::time_of_impact to QueryDispatcher::cast_shapes.
  • The (linear) shape-casting functions like query::cast_shapes (previously named
    query::time_of_impact) now take a ShapeCastOptionsinstead of themax_toiandstop_at_penetrationarguments. ThisShapeCastOptionsincludes two new options:ShapeCastOptions::target_distancewhich will return a hit as soon as the moving shapes are closer than this distance; andcompute_impact_geometry_on_penetration which forces the calculation of proper witness points and normals even if the shapes are initially intersecting (toi == 0.0, time_of_impact == 0.0`).
  • Rename query::nonlinear_time_of_impact to query::cast_shapes_nonlinear.
  • Rename QueryDispatcher::nonlinear_time_of_impact to QueryDispatcher::cast_sahpes_nonlinear.
  • Rename NonlinearTOIMode to NonlinearShapeCastMode, and NonlinearTOIMode::DirectionalTOI to
    NonlinearShapeCastMode::Directional.
  • Rename TimeOfImpactStatus::Penetrating to ShapeCastStatus::PenetratingOrWithinTargetDist.

@sebcrozet sebcrozet merged commit 266bccb into master May 5, 2024
5 checks passed
@sebcrozet sebcrozet deleted the shape-cast-renamings branch May 5, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant