[−][src]Trait nphysics3d::force_generator::ForceGenerator
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> dyn ForceGenerator<N> where
N: Any + 'static,
N: RealField,
N: Any + 'static,
N: RealField,
pub fn is<__T: ForceGenerator<N>>(&self) -> bool
Returns true if the trait object wraps an object of type __T
.
pub fn downcast<__T: ForceGenerator<N>>(
self: Box<Self>
) -> Result<Box<__T>, Box<Self>>
self: Box<Self>
) -> Result<Box<__T>, Box<Self>>
Returns a boxed object from a boxed trait object if the underlying object is of type
__T
. Returns the original boxed trait if it isn't.
pub fn downcast_ref<__T: ForceGenerator<N>>(&self) -> Option<&__T>
Returns a reference to the object within the trait object if it is of type __T
, or
None
if it isn't.
pub fn downcast_mut<__T: ForceGenerator<N>>(&mut self) -> Option<&mut __T>
Returns a mutable reference to the object within the trait object if it is of type
__T
, or None
if it isn't.
Implementors
impl<N: RealField> ForceGenerator<N> for ConstantAcceleration<N>
[src]
fn apply(
&mut self,
_: &IntegrationParameters<N>,
bodies: &mut BodySet<N>
) -> bool
[src]
&mut self,
_: &IntegrationParameters<N>,
bodies: &mut BodySet<N>
) -> bool
impl<N: RealField> ForceGenerator<N> for Spring<N>
[src]
fn apply(
&mut self,
_: &IntegrationParameters<N>,
bodies: &mut BodySet<N>
) -> bool
[src]
&mut self,
_: &IntegrationParameters<N>,
bodies: &mut BodySet<N>
) -> bool