Struct chipmunk_rs::PolyShape
[−]
[src]
pub struct PolyShape<T: ChipmunkRsTypes> { /* fields omitted */ }
A CircleShape. See Working With Polygon Shapes.
Methods
impl<T: ChipmunkRsTypes> PolyShape<T>
[src]
fn new_box(
body: BodyHandle<T>,
width: f64,
height: f64,
radius: f64
) -> PolyShape<T>
body: BodyHandle<T>,
width: f64,
height: f64,
radius: f64
) -> PolyShape<T>
Create a new box shape. radius is the radius of the corners. Use radius: 0.0
for no rounded corners.
See Working With Polygon Shapes.
Trait Implementations
impl<T: ChipmunkRsTypes> Drop for PolyShape<T>
[src]
impl<T: ChipmunkRsTypes> BaseShape for PolyShape<T>
[src]
impl<T: ChipmunkRsTypes> Shape<T> for PolyShape<T>
[src]
fn body(&self) -> BodyHandle<T>
Get the body attached to the shape.
fn elasticity(&self) -> f64
See Chipmunk Collision Shapes.
fn friction(&self) -> f64
See Chipmunk Collision Shapes.
fn set_body(&mut self, body: Body<T>)
See Chipmunk Collision Shapes.
fn set_elasticity(&mut self, value: f64)
See Chipmunk Collision Shapes.
fn set_friction(&mut self, value: f64)
See Chipmunk Collision Shapes.