Skip to content

Commit

Permalink
Expose from_rapier method for Toi
Browse files Browse the repository at this point in the history
  • Loading branch information
Aceeri committed Aug 23, 2023
1 parent ffc00d3 commit 9c0eb23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/geometry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ pub struct ToiDetails {
}

impl Toi {
pub(crate) fn from_rapier(physics_scale: Real, toi: rapier::parry::query::TOI) -> Self {
/// Convert from internal `rapier::Toi`.
pub fn from_rapier(physics_scale: Real, toi: rapier::parry::query::TOI) -> Self {
let details = if toi.status != TOIStatus::Penetrating {
Some(ToiDetails {
witness1: (toi.witness1 * physics_scale).into(),
Expand Down

0 comments on commit 9c0eb23

Please sign in to comment.