VertexPairing

interface VertexPairing

Determines how the vertices of two 2D shapes are to be paired up when making 3d shapes from 2d shapes.

Imaging placing shapeA on the Z=0 plane, and shapeB on the plane Z=1 We now want to "merge" the shapes together to form a 3D object. The top and bottom faces are shapesA and shapeB. It it up to VertexPairing to work out the other faces.

NOTE, VertexPairing doesn't create the faces, it merely defines pairs of points where an edge MUST be formed.

Inheritors

Functions

Link copied to clipboard
abstract fun pairPoints(shapeA: List<Vector2>, shapeB: List<Vector2>): List<Pair<Int, Int>>

Returns a list of edges, which should be ordered clockwise.