[][src]Struct specs_physics::Physics

pub struct Physics<N: RealField> { /* fields omitted */ }

Resource holding the internal fields where physics computation occurs. Some inspection methods are exposed to allow debugging.

Methods

impl<N: RealField> Physics<N>[src]

pub fn new() -> Self[src]

Creates a new instance of the physics structure.

pub fn timestep(&self) -> N[src]

Reports the internal value for the timestep. See also TimeStep for setting this value.

pub fn gravity(&self) -> &Vector3<N>[src]

Reports the internal value for the gravity. See also Gravity for setting this value.

pub fn prediction(&self) -> N[src]

Reports the internal value for prediction distance in collision detection. This cannot change and will normally be 0.002m

pub fn performance_counters(&self) -> &Counters[src]

Retrieves the performance statistics for the last simulated timestep. Profiling is disabled by default. See also PhysicsProfilingEnabled for enabling performance counters.

pub fn integration_parameters(&self) -> &IntegrationParameters<N>[src]

Retrieves the internal parameters for integration. See also PhysicsIntegrationParameters for setting these parameters.

pub fn materials_coefficients_table(&self) -> &MaterialsCoefficientsTable<N>[src]

Retrieves the internal lookup table for friction and restitution constants. Exposing this for modification is TODO.

Trait Implementations

impl<N: RealField> Default for Physics<N>[src]

Auto Trait Implementations

impl<N> Send for Physics<N> where
    N: Scalar

impl<N> Sync for Physics<N> where
    N: Scalar

Blanket Implementations

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

impl<T> From<T> for 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

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> Downcast for T where
    T: Any

impl<T> Event for T where
    T: Send + Sync + 'static, 
[src]

impl<T> Resource for T where
    T: Any + Send + Sync

impl<T> TryDefault for T where
    T: Default
[src]

fn unwrap_default() -> Self[src]

Calls try_default and panics on an error case.

impl<T> Any for T where
    T: Any

impl<T> Erased for T