Trait nphysics3d::force_generator::ForceGenerator [−][src]
pub trait ForceGenerator<N: Real>: Any + Send + Sync { fn apply(
&mut self,
params: &IntegrationParameters<N>,
bodies: &mut BodySet<N>
) -> bool; }
A persistent force generator.
A force generator applies a force to one or several bodies at each step of the simulation.
Required Methods
fn apply(
&mut self,
params: &IntegrationParameters<N>,
bodies: &mut BodySet<N>
) -> bool
&mut self,
params: &IntegrationParameters<N>,
bodies: &mut BodySet<N>
) -> bool
Apply forces to some bodies.
Methods
impl<N> ForceGenerator<N> where
N: Real,
impl<N> ForceGenerator<N> where
N: Real,
pub fn is<_T>(&self) -> bool where
_T: Any,
Self: Downcast<_T>,
pub fn is<_T>(&self) -> bool where
_T: Any,
Self: Downcast<_T>,
ⓘImportant traits for &'a mut Rpub unsafe fn downcast_ref_unchecked<_T>(&self) -> &_T where
_T: Any,
Self: Downcast<_T>,
ⓘImportant traits for &'a mut R
pub unsafe fn downcast_ref_unchecked<_T>(&self) -> &_T where
_T: Any,
Self: Downcast<_T>,
pub fn downcast_ref<_T>(&self) -> Result<&_T, TypeMismatch> where
_T: Any,
Self: Downcast<_T>,
pub fn downcast_ref<_T>(&self) -> Result<&_T, TypeMismatch> where
_T: Any,
Self: Downcast<_T>,
ⓘImportant traits for &'a mut Rpub unsafe fn downcast_mut_unchecked<_T>(&mut self) -> &mut _T where
_T: Any,
Self: Downcast<_T>,
ⓘImportant traits for &'a mut R
pub unsafe fn downcast_mut_unchecked<_T>(&mut self) -> &mut _T where
_T: Any,
Self: Downcast<_T>,
pub fn downcast_mut<_T>(&mut self) -> Result<&mut _T, TypeMismatch> where
_T: Any,
Self: Downcast<_T>,
pub fn downcast_mut<_T>(&mut self) -> Result<&mut _T, TypeMismatch> where
_T: Any,
Self: Downcast<_T>,
ⓘImportant traits for Box<R>pub unsafe fn downcast_unchecked<_T>(self: Box<Self>) -> Box<_T> where
_T: Any,
Self: Downcast<_T>,
ⓘImportant traits for Box<R>
pub unsafe fn downcast_unchecked<_T>(self: Box<Self>) -> Box<_T> where
_T: Any,
Self: Downcast<_T>,
pub fn downcast<_T>(
self: Box<Self>
) -> Result<Box<_T>, DowncastError<Box<Self>>> where
_T: Any,
Self: Downcast<_T>,
pub fn downcast<_T>(
self: Box<Self>
) -> Result<Box<_T>, DowncastError<Box<Self>>> where
_T: Any,
Self: Downcast<_T>,
Trait Implementations
impl<_T: Any, N> Downcast<_T> for ForceGenerator<N> where
_T: Any,
N: 'static,
N: Real,
impl<_T: Any, N> Downcast<_T> for ForceGenerator<N> where
_T: Any,
N: 'static,
N: Real,
fn is_type(&self) -> bool
[src]
fn is_type(&self) -> bool
ⓘImportant traits for &'a mut Runsafe fn downcast_ref_unchecked(&self) -> &T
[src]
ⓘImportant traits for &'a mut R
unsafe fn downcast_ref_unchecked(&self) -> &T
fn downcast_ref(&self) -> Result<&T, TypeMismatch>
[src]
fn downcast_ref(&self) -> Result<&T, TypeMismatch>
ⓘImportant traits for &'a mut Runsafe fn downcast_mut_unchecked(&mut self) -> &mut T
[src]
ⓘImportant traits for &'a mut R
unsafe fn downcast_mut_unchecked(&mut self) -> &mut T
fn downcast_mut(&mut self) -> Result<&mut T, TypeMismatch>
[src]
fn downcast_mut(&mut self) -> Result<&mut T, TypeMismatch>
ⓘImportant traits for Box<R>unsafe fn downcast_unchecked(self: Box<Self>) -> Box<T>
[src]
ⓘImportant traits for Box<R>
unsafe fn downcast_unchecked(self: Box<Self>) -> Box<T>
fn downcast(self: Box<Self>) -> Result<Box<T>, DowncastError<Box<Self>>>
[src]
fn downcast(self: Box<Self>) -> Result<Box<T>, DowncastError<Box<Self>>>
Implementors
impl<N: Real> ForceGenerator<N> for ConstantAcceleration<N>
impl<N: Real> ForceGenerator<N> for Spring<N>