Distance

expect object Distance

Functions for computing distances and casts between shapes.

Functions

Link copied to clipboard
expect fun makeOffsetProxy(points: List<Vec2>, radius: Float, position: Vec2, rotation: Rot): ShapeProxy

Make a shape proxy from a point cloud with a position and rotation offset.

Link copied to clipboard
expect fun makeProxy(points: List<Vec2>, radius: Float): ShapeProxy

Make a shape proxy from a point cloud and radius.

Link copied to clipboard
expect fun segmentDistance(p1: Vec2, q1: Vec2, p2: Vec2, q2: Vec2): SegmentDistanceResult

Compute the distance between two line segments, clamping at the end points if needed.

Link copied to clipboard

Perform a linear shape cast between two shapes.

Link copied to clipboard

Compute the closest points between two shapes represented by proxies.