Struct liquidfun::box2d::dynamics::fixture::Fixture
[−]
[src]
pub struct Fixture { pub ptr: *mut B2Fixture, }
A fixture is used to attach a shape to a body for collision detection. A fixture inherits its transform from its parent. Fixtures hold additional non-geometric data such as friction, collision filters, etc. Fixtures are created via b2Body::CreateFixture. @warning you cannot reuse fixtures.
Fields
ptr |
Methods
impl Fixture
fn get_type(&self) -> Type
Get the type of the child shape. You can use this to down cast to the concrete shape. @return the shape type.
fn get_shape(&self) -> *mut B2Shape
Get the child shape. You can modify the child shape, however you should not change the number of vertices because this will crash some collision caching mechanisms. Manipulating the shape may lead to non-physical behavior.
fn get_next(&self) -> Option<Fixture>
Get the next fixture in the parent body's fixture list. @return the next fixture.