DistanceOutput

data class DistanceOutput(val pointA: Vec2, val pointB: Vec2, val normal: Vec2, val distance: Float, val iterations: Int)

Output of computing the distance between two shapes.

Parameters

pointA

Closest point on shape A

pointB

Closest point on shape B

normal

Normal vector that points from A to B (invalid if distance is zero)

distance

The final distance (zero if overlapped)

iterations

Number of GJK iterations used

Constructors

Link copied to clipboard
constructor(pointA: Vec2, pointB: Vec2, normal: Vec2, distance: Float, iterations: Int)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard