fixture
inline fun <ShapeType : Shape> BodyDefinition.fixture(shape: ShapeType, disposeOfShape: Boolean = false, init: FixtureDefinition.(ShapeType) -> Unit = {}): FixtureDefinition
Utility builder method for constructing fixtures of custom shape type.
Parameters
shape
will be set as FixtureDef shape type.
disposeOfShape
whether to call Shape.dispose immediately after fixture creation. false
by default.
init
inlined. Allows to modify FixtureDef properties. Receives shape as first (it
) argument.
See also
inline fun <S : Shape> Body.fixture(shape: S, disposeOfShape: Boolean = false, init: FixtureDefinition.(S) -> Unit = {}): Fixture
Utility builder method for constructing fixtures of custom shape type.
Return
a fully constructed Fixture with properties from the defined FixtureDef.
Parameters
shape
will be set as FixtureDef shape type.
disposeOfShape
whether to call Shape.dispose immediately after fixture creation. false
by default.
init
inlined. Allows to modify FixtureDef properties. Receives shape as first (it
) argument.