Chain

expect class Chain

A chain shape is a series of connected line segments. Chains can be used for static geometry like terrain or for dynamic chains.

Properties

Link copied to clipboard
expect val isValid: Boolean

Check if this chain reference is valid.

Link copied to clipboard
expect val segmentCount: Int

Get the number of segments in this chain.

Link copied to clipboard
expect val world: World

Get the world that owns this chain.

Functions

Link copied to clipboard
expect fun destroy()

Destroy this chain and all its segments.

Link copied to clipboard
expect fun getFriction(): Float

Get the friction for all segments of this chain.

Link copied to clipboard
expect fun getMaterial(): Int

Get the material for all segments of this chain.

Link copied to clipboard
expect fun getRestitution(): Float

Get the restitution for all segments of this chain.

Link copied to clipboard
expect fun getSegments(): List<Shape>

Get the segment shapes that make up this chain.

Link copied to clipboard
expect fun setFriction(friction: Float)

Set the friction for all segments of this chain.

Link copied to clipboard
expect fun setMaterial(material: Int)

Set the material for all segments of this chain.

Link copied to clipboard
expect fun setRestitution(restitution: Float)

Set the restitution for all segments of this chain.