corners(exterior:)

Returns a set of VoxelIndex offsets for the four corners of the face, in the winding order to create a 3D mesh quad from two triangles.

VoxelConstants.swift:132
func corners(exterior: Bool = true) -> [VoxelIndex]

Parameters

exterior

A Boolean value that indicates whether the quad is viewed from the exterior of the voxel.

The coordinate structure for the resulting offsets assumes a right-handed, Y-up coordinate system with a default view looking down the -Z direction.

The points of the Quad, viewed face-front, are ‘wound’ in the following order:

v1  v3
 | /|
 |/ |
v2  v4