[−][src]Struct specs_physics::Physics
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
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> Event for T where
T: Send + Sync + 'static,
[src]
T: Send + Sync + 'static,
impl<T> Resource for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> TryDefault for T where
T: Default,
[src]
T: Default,
fn try_default() -> Result<T, String>
[src]
fn unwrap_default() -> Self
[src]
Calls try_default
and panics on an error case.
impl<T> Any for T where
T: Any,
T: Any,