[−][src]Struct nphysics2d::object::MassSpringSystemDesc
A builder for mass-spring systems.
Methods
impl<'a, N: Real> MassSpringSystemDesc<'a, N>
[src]
pub fn from_polyline(polyline: &'a Polyline<N>) -> Self
[src]
Create a mass-constraints system form a polygonal line.
pub fn quad(subdiv_x: usize, subdiv_y: usize) -> Self
[src]
Create a quad-shaped body.
pub fn user_data(
self,
data: impl UserData
) -> Self
[src]
self,
data: impl UserData
) -> Self
Sets a user-data to be attached to the object being built.
pub fn set_user_data(
&mut self,
data: Option<impl UserData>
) -> &mut Self
[src]
&mut self,
data: Option<impl UserData>
) -> &mut Self
Sets the user-data to be attached to the object being built.
pub fn get_user_data(&self) -> Option<&(dyn Any + Send + Sync)>
[src]
Reference to the user-data to be attached to the object being built.
pub fn clear_kinematic_nodes(&mut self) -> &mut Self
[src]
Mark all nodes as non-kinematic.
pub fn plasticity(self, strain_threshold: N, creep: N, max_force: N) -> Self
[src]
pub fn set_plasticity(
&mut self,
strain_threshold: N,
creep: N,
max_force: N
) -> &mut Self
[src]
&mut self,
strain_threshold: N,
creep: N,
max_force: N
) -> &mut Self
pub fn kinematic_nodes(self, nodes: &[usize]) -> Self
[src]
pub fn set_nodes_kinematic(&mut self, nodes: &[usize]) -> &mut Self
[src]
pub fn translation(self, vector: Vector<N>) -> Self
[src]
pub fn set_translation(&mut self, vector: Vector<N>) -> &mut Self
[src]
pub fn name(self, name: String) -> Self
[src]
pub fn set_name(&mut self, name: String) -> &mut Self
[src]
pub fn gravity_enabled(self, gravity_enabled: bool) -> Self
[src]
pub fn enable_gravity(&mut self, gravity_enabled: bool) -> &mut Self
[src]
pub fn collider_enabled(self, collider_enabled: bool) -> Self
[src]
pub fn set_collider_enabled(&mut self, collider_enabled: bool) -> &mut Self
[src]
pub fn scale(self, scale: Vector<N>) -> Self
[src]
pub fn set_scale(&mut self, scale: Vector<N>) -> &mut Self
[src]
pub fn stiffness(self, stiffness: N) -> Self
[src]
pub fn set_stiffness(&mut self, stiffness: N) -> &mut Self
[src]
pub fn sleep_threshold(self, sleep_threshold: Option<N>) -> Self
[src]
pub fn set_sleep_threshold(&mut self, sleep_threshold: Option<N>) -> &mut Self
[src]
pub fn damping_ratio(self, damping_ratio: N) -> Self
[src]
pub fn set_damping_ratio(&mut self, damping_ratio: N) -> &mut Self
[src]
pub fn mass(self, mass: N) -> Self
[src]
pub fn set_mass(&mut self, mass: N) -> &mut Self
[src]
pub fn status(self, status: BodyStatus) -> Self
[src]
pub fn set_status(&mut self, status: BodyStatus) -> &mut Self
[src]
pub fn position(self, position: Isometry<N>) -> Self
[src]
pub fn set_position(&mut self, position: Isometry<N>) -> &mut Self
[src]
pub fn get_plasticity_strain_threshold(&self) -> N
[src]
pub fn get_plasticity_creep(&self) -> N
[src]
pub fn get_plasticity_max_force(&self) -> N
[src]
pub fn get_kinematic_nodes(&self) -> &[usize]
[src]
pub fn get_translation(&self) -> &Vector<N>
[src]
pub fn get_name(&self) -> &str
[src]
pub fn is_gravity_enabled(&self) -> bool
[src]
pub fn get_stiffness(&self) -> N
[src]
pub fn get_sleep_threshold(&self) -> Option<N>
[src]
pub fn get_damping_ratio(&self) -> N
[src]
pub fn get_mass(&self) -> N
[src]
pub fn get_status(&self) -> BodyStatus
[src]
pub fn is_collider_enabled(&self) -> bool
[src]
pub fn get_position(&self) -> &Isometry<N>
[src]
pub fn get_scale(&self) -> &Vector<N>
[src]
pub fn build<'w>(&self, world: &'w mut World<N>) -> &'w mut MassSpringSystem<N>
[src]
Builds a mass-spring system.
Trait Implementations
impl<'a, N: Real> BodyDesc<N> for MassSpringSystemDesc<'a, N>
[src]
type Body = MassSpringSystem<N>
The type of body being generated.
fn build_with_handle(
&self,
cworld: &mut ColliderWorld<N>,
handle: BodyHandle
) -> MassSpringSystem<N>
[src]
&self,
cworld: &mut ColliderWorld<N>,
handle: BodyHandle
) -> MassSpringSystem<N>
Auto Trait Implementations
impl<'a, N> Send for MassSpringSystemDesc<'a, N> where
N: Scalar,
N: Scalar,
impl<'a, N> Sync for MassSpringSystemDesc<'a, N> where
N: Scalar,
N: Scalar,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<T> Same for T
type Output = T
Should always be Self