Trait chipmunk_rs::Shape
[−]
[src]
pub trait Shape<T: ChipmunkRsTypes>: BaseShape { fn body(&self) -> BodyHandle<T>; fn elasticity(&self) -> f64 { ... } fn friction(&self) -> f64 { ... } fn set_body(&mut self, body: Body<T>) { ... } fn set_elasticity(&mut self, value: f64) { ... } fn set_friction(&mut self, value: f64) { ... } }
A collision Shape trait. See Chipmunk Collision Shapes. All shape structs implement this trait.
Required Methods
fn body(&self) -> BodyHandle<T>
Get the body attached to the shape.
Provided Methods
fn elasticity(&self) -> f64
fn friction(&self) -> f64
fn set_body(&mut self, body: Body<T>)
fn set_elasticity(&mut self, value: f64)
fn set_friction(&mut self, value: f64)
Implementors
impl<T: ChipmunkRsTypes> Shape<T> for CircleShape<T>
impl<T: ChipmunkRsTypes> Shape<T> for PolyShape<T>