Skip to main content

b2CreateChainSegmentShape

Function b2CreateChainSegmentShape 

Source
pub unsafe extern "C" fn b2CreateChainSegmentShape(
    bodyId: b2BodyId,
    def: *const b2ShapeDef,
    chainSegment: *const b2ChainSegment,
) -> b2ShapeId
Expand description

Create an orphaned chain segment shape and attach it to a body. The shape definition and geometry are fully cloned. The caller is responsible for the segment’s ghost vertices and lifetime. The segment is not owned by any b2ChainShape (b2Shape_GetParentChain returns b2_nullChainId). Contacts are not created until the next time step. @return the shape id, or b2_nullShapeId if the segment is too short.