[−][src]Struct linear_sim::system::System
A system representing the computational model for the simulation.
There are three categories of entities that are found in the system (model):
- Objects --
Static
,Dynamic
,Nodetect
- Forces --
Gravity
- Constraints -- 'Planar', 'Penetration' (TODO)
Methods
impl<INTG: Integrator> System<INTG>
[src]
pub fn new() -> Self where
INTG: Default,
[src]
INTG: Default,
pub fn step(&self) -> u64
[src]
pub fn objects_dynamic(&self) -> &VecMap<Dynamic>
[src]
pub fn objects_nodetect(&self) -> &VecMap<Nodetect>
[src]
pub fn objects_static(&self) -> &VecMap<Static>
[src]
pub fn handle_event(&mut self, input: Input) -> Vec<Output>
[src]
Input event handling.
CreateObject
-- if an object is found to be in non-colliding contact with any other objects, those contacts will be registered with the collision system as persistent contacts for the upcoming stepDestroyObject
SetGravity
ClearGravity
Step
-- advance the simulation by a single timestep:-
Derivative evaluation: forces are accumulated and acceleration computed
-
Velocities are integrated
-
Velocity constraints are solved
-
Positions are integrated using the new velocity (semi-implicit Euler)
-
Position constraints are solved
-
Collision detects and resolves collisions in the normalized sub-timestep [0.0-1.0).
Note that colliding contacts detected at t==1.0 will not produce a collision response event (the next step will detect and resolve this collision), however resting or separating contacts detected at t==1.0 will be registered as a persistent contact for the next simulation step.
-
Trait Implementations
impl<INTG: PartialEq + Integrator> PartialEq<System<INTG>> for System<INTG>
[src]
impl<INTG: Clone + Integrator> Clone for System<INTG>
[src]
fn clone(&self) -> System<INTG>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<INTG: Default + Integrator> Default for System<INTG>
[src]
impl<INTG: Debug + Integrator> Debug for System<INTG>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self