pub struct StepContext {
pub dt: f32,
pub inv_dt: f32,
pub h: f32,
pub inv_h: f32,
pub sub_step_count: i32,
pub contact_softness: Softness,
pub static_softness: Softness,
pub restitution_threshold: f32,
pub max_linear_velocity: f32,
pub contact_speed: f32,
pub enable_warm_starting: bool,
}Expand description
Context for a time step. Recreated each time step. (b2StepContext — step parameters only; see the module header for what the serial port drops)
Fields§
§dt: f32time step
inv_dt: f32inverse time step (0 if dt == 0).
h: f32sub-step
inv_h: f32§sub_step_count: i32§contact_softness: Softness§static_softness: Softness§restitution_threshold: f32§max_linear_velocity: f32§contact_speed: f32Copied from World::contact_speed (the C reads it through context->world).
enable_warm_starting: boolTrait Implementations§
Source§impl Clone for StepContext
impl Clone for StepContext
Source§fn clone(&self) -> StepContext
fn clone(&self) -> StepContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StepContext
Source§impl Debug for StepContext
impl Debug for StepContext
Source§impl Default for StepContext
impl Default for StepContext
Source§fn default() -> StepContext
fn default() -> StepContext
Returns the “default value” for a type. Read more
Source§impl PartialEq for StepContext
impl PartialEq for StepContext
impl StructuralPartialEq for StepContext
Auto Trait Implementations§
impl Freeze for StepContext
impl RefUnwindSafe for StepContext
impl Send for StepContext
impl Sync for StepContext
impl Unpin for StepContext
impl UnsafeUnpin for StepContext
impl UnwindSafe for StepContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more