Struct parry3d::query::details::ShapeCastOptions
source · pub struct ShapeCastOptions {
pub max_time_of_impact: Real,
pub target_distance: Real,
pub stop_at_penetration: bool,
pub compute_impact_geometry_on_penetration: bool,
}
Expand description
Configuration for controlling the behavior of time-of-impact (i.e. shape-casting) calculations.
Fields§
§max_time_of_impact: Real
The maximum time-of-impacts that can be computed.
Any impact ocurring after this time will be ignored.
target_distance: Real
The shapes will be considered as impacting as soon as their distance is smaller or equal to this target distance. Must be positive or zero.
If the shapes are separated by a distance smaller than target_distance
at time 0, the
calculated witness points and normals are only reliable if
Self::compute_impact_geometry_on_penetration
is set to true
.
stop_at_penetration: bool
If false
, the time-of-impact algorithm will automatically discard any impact at time
0 where the velocity is separating (i.e., the relative velocity is such that the distance
between the objects projected on the impact normal is increasing through time).
compute_impact_geometry_on_penetration: bool
If true
, witness points and normals will be calculated even when the time-of-impact is 0.
Implementations§
source§impl ShapeCastOptions
impl ShapeCastOptions
sourcepub fn with_max_time_of_impact(max_time_of_impact: Real) -> Self
pub fn with_max_time_of_impact(max_time_of_impact: Real) -> Self
Crates a ShapeCastOptions
with the default values except for the maximum time of impact.
Trait Implementations§
source§impl Clone for ShapeCastOptions
impl Clone for ShapeCastOptions
source§fn clone(&self) -> ShapeCastOptions
fn clone(&self) -> ShapeCastOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ShapeCastOptions
impl Debug for ShapeCastOptions
source§impl Default for ShapeCastOptions
impl Default for ShapeCastOptions
source§impl PartialEq for ShapeCastOptions
impl PartialEq for ShapeCastOptions
source§fn eq(&self, other: &ShapeCastOptions) -> bool
fn eq(&self, other: &ShapeCastOptions) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for ShapeCastOptions
impl StructuralPartialEq for ShapeCastOptions
Auto Trait Implementations§
impl Freeze for ShapeCastOptions
impl RefUnwindSafe for ShapeCastOptions
impl Send for ShapeCastOptions
impl Sync for ShapeCastOptions
impl Unpin for ShapeCastOptions
impl UnwindSafe for ShapeCastOptions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.