Struct chipmunk_rs::Space
[−]
[src]
pub struct Space<T: ChipmunkRsTypes> { /* fields omitted */ }
A 2D space. See Chipmunk Spaces.
Methods
impl<T: ChipmunkRsTypes> Space<T>
[src]
fn new() -> Space<T>
Create a new sapce. You should set T
explicitelly (e.g. let mut space: Space<TupleTypes> = Space::new();
).
fn gravity(&self) -> T::Vect
See Chipmunk Spaces.
fn is_locked(&self) -> bool
See Chipmunk Spaces.
fn current_time_step(&self) -> f64
See Chipmunk Spaces.
fn iterations(&self) -> i32
See Chipmunk Spaces.
fn damping(&self) -> f64
See Chipmunk Spaces.
fn idle_speed_threshold(&self) -> f64
See Chipmunk Spaces.
fn sleep_time_threshold(&self) -> f64
See Chipmunk Spaces.
fn collision_slop(&self) -> f64
See Chipmunk Spaces.
fn collision_bias(&self) -> f64
See Chipmunk Spaces.
fn collision_persistence(&self) -> u32
See Chipmunk Spaces.
fn set_gravity(&self, g: T::Vect)
See Chipmunk Spaces.
fn set_iterations(&mut self, value: i32)
See Chipmunk Spaces.
fn set_damping(&mut self, value: f64)
See Chipmunk Spaces.
fn set_idle_speed_threshold(&mut self, value: f64)
See Chipmunk Spaces.
fn set_sleep_time_threshold(&mut self, value: f64)
See Chipmunk Spaces.
fn set_collision_slop(&mut self, value: f64)
See Chipmunk Spaces.
fn set_collision_bias(&mut self, value: f64)
See Chipmunk Spaces.
fn set_collision_persistence(&mut self, value: u32)
See Chipmunk Spaces.
fn step(&mut self, dt: f64)
See Chipmunk Spaces.
fn add_shape(&mut self, shape: Box<Shape<T>>) -> ShapeHandle<T>
See Chipmunk Spaces. Make sure to also insert any attached body (this is not done for you).
fn add_body(&mut self, body: Body<T>) -> BodyHandle<T>
See Chipmunk Spaces.
fn remove_shape(&mut self, shape: ShapeHandle<T>) -> Option<ShapeHandle<T>>
See Chipmunk Spaces.
fn remove_body(&mut self, body: BodyHandle<T>) -> Option<BodyHandle<T>>
See Chipmunk Spaces.
fn contains_shape(&self, shape: ShapeHandle<T>) -> bool
See Chipmunk Spaces.
fn contains_body(&self, body: BodyHandle<T>) -> bool
See Chipmunk Spaces.