pub struct SoftBodyDesc {
pub particles: Vec<[f32; 3]>,
pub inverse_masses: Vec<f32>,
pub elements: Vec<SoftElement>,
pub attachments: Vec<SoftAttachment>,
pub fluid: Option<FluidMaterial>,
pub radius: f32,
pub friction: f32,
pub position: [f32; 3],
pub orientation: [f32; 4],
pub velocity: [f32; 3],
}Fields§
§particles: Vec<[f32; 3]>§inverse_masses: Vec<f32>§elements: Vec<SoftElement>§attachments: Vec<SoftAttachment>§fluid: Option<FluidMaterial>§radius: f32§friction: f32§position: [f32; 3]§orientation: [f32; 4]§velocity: [f32; 3]Implementations§
Source§impl SoftBodyDesc
impl SoftBodyDesc
pub fn new(particles: Vec<[f32; 3]>, elements: Vec<SoftElement>) -> Self
pub fn attach(self, attachment: SoftAttachment) -> Self
pub fn assert_attachments(&self)
pub fn fluid( particles: Vec<[f32; 3]>, radius: f32, material: FluidMaterial, ) -> Self
pub fn net(particles: Vec<[f32; 3]>, links: Vec<[u32; 2]>) -> Self
pub fn cloth(extent: [u32; 2], spacing: f32, material: SoftMaterial) -> Self
pub fn lattice(extent: [u32; 3], spacing: f32, material: SoftMaterial) -> Self
pub fn inverse_masses(self, inverse_masses: Vec<f32>) -> Self
pub fn compliance(self, compliance: f32) -> Self
pub fn yielding(self, yield_strain: f32, plastic_flow: f32) -> Self
pub fn fracturing(self, break_strain: f32) -> Self
pub fn carries_strength(&self) -> bool
pub fn pinned(self, indices: &[u32]) -> Self
pub fn radius(self, radius: f32) -> Self
pub fn friction(self, friction: f32) -> Self
pub fn position(self, position: [f32; 3]) -> Self
pub fn orientation(self, orientation: [f32; 4]) -> Self
pub fn velocity(self, velocity: [f32; 3]) -> Self
Trait Implementations§
Source§impl Clone for SoftBodyDesc
impl Clone for SoftBodyDesc
Source§fn clone(&self) -> SoftBodyDesc
fn clone(&self) -> SoftBodyDesc
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 moreSource§impl Debug for SoftBodyDesc
impl Debug for SoftBodyDesc
Source§impl PartialEq for SoftBodyDesc
impl PartialEq for SoftBodyDesc
impl StructuralPartialEq for SoftBodyDesc
Auto Trait Implementations§
impl Freeze for SoftBodyDesc
impl RefUnwindSafe for SoftBodyDesc
impl Send for SoftBodyDesc
impl Sync for SoftBodyDesc
impl Unpin for SoftBodyDesc
impl UnsafeUnpin for SoftBodyDesc
impl UnwindSafe for SoftBodyDesc
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