pub struct SoftRecoverySettings {Show 27 fields
pub authored_velocity_margin: bool,
pub edge_speculation: bool,
pub inverted_cell_detection: bool,
pub self_crossing_detection: bool,
pub detection_motion_gating: bool,
pub cross_body_detection: bool,
pub self_stand_down: bool,
pub cross_body_expel_gate: bool,
pub edge_stand_down: bool,
pub crossing_repulsion: bool,
pub crossing_repulsion_guide: bool,
pub crossing_repulsion_self_guide: bool,
pub recovery_pace: f32,
pub overlap_constraints: bool,
pub overlap_rigid: bool,
pub overlap_skip_self_tangled: bool,
pub overlap_edge_stand_down: bool,
pub overlap_constraint_pace: f32,
pub overlap_patch_constraints: SoftPatchConstraints,
pub overlap_skin_volume: bool,
pub overlap_kept_depth: f32,
pub overlap_self_regions: bool,
pub overlap_normal_push: bool,
pub overlap_multi_volume: bool,
pub overlap_split: u32,
pub overlap_patience: u32,
pub overlap_progress_margin: f32,
}Expand description
Runtime configuration of the soft-body tangle detection and recovery stack. It lives on
crate::dynamics::SoftBodiesSettings::recovery (itself on
IntegrationParameters::soft_bodies), so it can be changed between steps.
Fields§
Raise the speculative contact margin from velocities authored between steps (insertion,
set_particle_velocity), so the coming step’s reach covers them and a fast fresh body
does not tunnel. (default: true)
edge_speculation: boolGive the edge-vs-edge pass a speculative reach (motion margin plus the closing-speed rule)
and, in 3D, edge constraints for closed-vs-closed pairs, so bodies crossing corner-first
collide; on, those constraints leave pressed 3D piles crossed. (default: false)
inverted_cell_detection: boolDetect inverted cells (material locally inside out) each step; feeds the self stand-down.
(default: true)
self_crossing_detection: boolDetect surface self-crossings each step (the BVTT sweep); feeds the self stand-down.
(default: true)
detection_motion_gating: boolSkip the self-crossing sweep while the surface’s accumulated travel could not have bridged
half a skin (crossings only form through motion). Off: sweep every step. (default: true)
cross_body_detection: boolDetect boundary crossings between pairs of soft surfaces; feeds the cross-body expel-only
gate, the edge-pass stand-down and the intersection-volume constraints. (default: true)
self_stand_down: boolSelf contacts of tangled features (inverted cells, self-crossings) stand down so the
elasticity resolves the tangle instead of freezing it at skin distance. (default: true)
cross_body_expel_gate: boolA vertex constraint touching a boundary crossing between two surfaces may only expel,
never hold (a keep-apart constraint there is wrong-sided by construction).
(default: true)
edge_stand_down: boolEdge constraints touching a cross-body boundary crossing stand down (thin open bodies
meet through their edge constraints, so the vertex gate alone cannot free them).
(default: true)
crossing_repulsion: boolConstraints on crossing-flagged features repel instead of standing down: the vertex is
pushed to the side of the element where its one-ring centroid lies, through to skin
distance; a neighborhood straddling the element still stands down. (default: false)
crossing_repulsion_guide: boolGuide the crossing repulsion by the pair’s volume normal (the separating direction of the
two intruding patches’ intersection-volume gradients, per grid cell) instead of the pierced
element’s plane normal. Closed pairs only; needs no volume constraint. (default: false)
crossing_repulsion_self_guide: boolGuide the self-crossing repulsion by the fold’s volume normal: the vertices inside their own
body’s self-intersection region are pulled toward the surface they face along the region’s
mean normal. Closed meshes only; needs no volume constraint. (default: false)
recovery_pace: f32Material recovery pace, in length units per second (scaled by
IntegrationParameters::length_unit): the corrective rate allowed to deep recovery,
demoted intruders and untangling pulls. (default: 0.5)
overlap_constraints: boolIntersection-volume contact (Allard et al. 2010) for closed surfaces: one coupled constraint
per overlapping pair (soft-soft or soft-rigid) over both sides’ intruding patches, corrected
by the intersection volume; master switch of the knobs below. (default: true)
overlap_rigid: boolOverlap constraints against rigid colliders too (the surface vertices inside the shape;
a dynamic rigid body takes the reaction, a fixed or kinematic one is a wall).
(default: true)
overlap_skip_self_tangled: boolA self-crossed mesh takes no pair constraint: part of its winding is mirrored, so its volume
gradient points the wrong way there (two crossed eights exploded without this).
(default: true)
overlap_edge_stand_down: boolThe 3D closed-closed edge constraints stand down on a pair an overlap constraint owns (inside the
overlap they are wrong-sided and freeze it). (default: true)
overlap_constraint_pace: f32Bound on the velocity change the coupled constraint may hand any side per step, in multiples
of Self::recovery_pace; Real::MAX makes it hard. (default: 1.0)
overlap_patch_constraints: SoftPatchConstraintsWhat the per-point constraints (manifold constraints against rigid colliders, vertex
constraints against soft surfaces) of the features inside a volume constraint’s patch do,
feature by feature (see SoftPatchConstraints). (default: AlongNormal)
overlap_skin_volume: boolMeasure the intersection volume on the contact skins (surfaces dilated by their skin), not
the geometric surfaces: a resting pair then has a hard volume constraint with speculative
slack before the skins meet. (default: false)
overlap_kept_depth: f32The skin overlap kept at rest, as a fraction of the pair’s skins (the paper’s maintained
interpenetration layer): the correction removes only the volume beyond it, holding the
patch’s average depth there; 0.0 rests the surfaces at their skins. (default: 0.0)
overlap_self_regions: boolVolume constraints on a body’s self-overlaps between distinct surface regions: the vertices
behind another part of their own surface form one patch per connected region, each coupled
with the surface it faces like a pair of bodies. Closed meshes only. (default: false)
overlap_normal_push: boolPush along each constraint’s normal instead of the volume gradients: every entry keeps its
gradient’s magnitude but takes the constraint’s mean direction, so the whole patch
separates along one axis. (default: true)
overlap_multi_volume: boolMulti-volume grid (the paper’s section 5): each pair’s patch is split into a regular grid of
cells along its tangent axes, each with its own constraint and multiplier, so the pressure
and friction state vary across the patch. (default: false)
overlap_split: u32Cells per tangent axis of the multi-volume grid. (default: 3)
overlap_patience: u32Steps without progress of a pair’s volume estimate before its positional correction
stands down (a wedged pair jiggled forever otherwise); it re-arms when the estimate
drops again. (default: 240)
overlap_progress_margin: f32Relative drop of the estimate that counts as progress for the patience.
(default: 0.02)
Trait Implementations§
Source§impl Clone for SoftRecoverySettings
impl Clone for SoftRecoverySettings
Source§fn clone(&self) -> SoftRecoverySettings
fn clone(&self) -> SoftRecoverySettings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SoftRecoverySettings
Source§impl Debug for SoftRecoverySettings
impl Debug for SoftRecoverySettings
Source§impl Default for SoftRecoverySettings
impl Default for SoftRecoverySettings
Source§fn default() -> SoftRecoverySettings
fn default() -> SoftRecoverySettings
Source§impl PartialEq for SoftRecoverySettings
impl PartialEq for SoftRecoverySettings
impl StructuralPartialEq for SoftRecoverySettings
Auto Trait Implementations§
impl Freeze for SoftRecoverySettings
impl RefUnwindSafe for SoftRecoverySettings
impl Send for SoftRecoverySettings
impl Sync for SoftRecoverySettings
impl Unpin for SoftRecoverySettings
impl UnsafeUnpin for SoftRecoverySettings
impl UnwindSafe for SoftRecoverySettings
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
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>, which can then be
downcast into Box<dyn 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>, which 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> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> FromTemplate for T
impl<T> FromTemplate for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
impl<T> MaybeSync for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
impl<T> Settings for T
Source§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.Source§impl<T> Template for T
impl<T> Template for T
Source§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a Template::Output.Source§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.Source§impl<T> TypeData for T
impl<T> TypeData for T
Source§fn clone_type_data(&self) -> Box<dyn TypeData>
fn clone_type_data(&self) -> Box<dyn TypeData>
self.