pub struct GpuClothSolver {
pub mesh: ClothMesh,
pub colliders: Vec<ClothCollider>,
pub xpbd_iterations: usize,
}Expand description
XPBD-style cloth solver (CPU mock implementation).
Wraps a ClothMesh together with a set of collision primitives and runs
position-based dynamic iterations per time step.
Fields§
§mesh: ClothMeshThe cloth mesh being simulated.
colliders: Vec<ClothCollider>Collision primitives.
xpbd_iterations: usizeNumber of XPBD constraint-projection iterations per time step.
Implementations§
Source§impl GpuClothSolver
impl GpuClothSolver
Sourcepub fn add_collider(&mut self, collider: ClothCollider)
pub fn add_collider(&mut self, collider: ClothCollider)
Add a collision primitive to the solver.
Trait Implementations§
Source§impl Clone for GpuClothSolver
impl Clone for GpuClothSolver
Source§fn clone(&self) -> GpuClothSolver
fn clone(&self) -> GpuClothSolver
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GpuClothSolver
impl RefUnwindSafe for GpuClothSolver
impl Send for GpuClothSolver
impl Sync for GpuClothSolver
impl Unpin for GpuClothSolver
impl UnsafeUnpin for GpuClothSolver
impl UnwindSafe for GpuClothSolver
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 more