Protocolheckj.voxels 0.2.6Voxels
VoxelAccessible
A type that holds a collection of voxels.
protocol VoxelAccessible<Element> : Collection
Browse conforming typesA type that holds a collection of voxels.
protocol VoxelAccessible<Element> : Collection
import Voxels
A Swift library for storage, manipulation, export, and 3D rendering of Voxel data.
associatedtype Element
protocol Collection<Element> : Sequence
A sequence whose elements can be traversed multiple times, nondestructively, and accessed by an indexed subscript.
protocol Sequence<Element>
A type that provides sequential, iterated access to its elements.
var bounds: VoxelBounds { get }
The bounds of the voxel collection.
subscript(_: VoxelIndex) -> Element? { get }
Accesses the voxel at the index you provide.
func value(_: VoxelIndex) throws -> Element?
Returns the voxel at the index you provide.
struct VoxelHash<T> where T : Sendable
A collection of voxels backed by a hash table.
struct VoxelArray<T> where T : Sendable
A collection of voxels backed by an array.
protocol VoxelWritable<Element> : VoxelAccessible
A type that holds an updatable collection of voxels.
protocol VoxelBlockRenderable
A type that can be rendered as opaque blocks.
func isSurface(_ vindex: VoxelIndex) -> Bool
func isSurface(_ tuple: (Int, Int, Int)) -> Bool
func isSurfaceFace(_ vindex: VoxelIndex, direction: CubeFace) -> Bool