[][src]Struct linear_sim::system::System

pub struct System<INTG: Integrator> { /* fields omitted */ }

A system representing the computational model for the simulation.

There are three categories of entities that are found in the system (model):

Methods

impl<INTG: Integrator> System<INTG>[src]

pub fn new() -> Self where
    INTG: Default
[src]

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 step
  • DestroyObject
  • SetGravity
  • ClearGravity
  • Step -- advance the simulation by a single timestep:
    1. Derivative evaluation: forces are accumulated and acceleration computed

    2. Velocities are integrated

    3. Velocity constraints are solved

    4. Positions are integrated using the new velocity (semi-implicit Euler)

    5. Position constraints are solved

    6. 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_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

impl<INTG> Send for System<INTG> where
    INTG: Send

impl<INTG> !Sync for System<INTG>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self