pub struct B2Shape {
pub m_type: B2ShapeType,
pub m_radius: f32,
}
Expand description
A shape is used for collision detection. You can create a shape however you like. Shapes used for simulation in B2world are created automatically when a B2fixture is created. Shapes may encapsulate a one or more child shapes.
Fields
m_type: B2ShapeType
m_radius: f32
Radius of a shape. For polygonal shapes this must be B2_POLYGON_RADIUS. There is no support for making rounded polygons.
Implementations
Get the type of this shape. You can use this to down cast to the concrete shape.
@return the shape type.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for B2Shape
impl UnwindSafe for B2Shape
Blanket Implementations
Mutably borrows from an owned value. Read more