Library Moduleheckj.voxels 0.2.6Voxels

Voxels

A Swift library for storage, manipulation, export, and 3D rendering of Voxel data.

Documentation.md
import Voxels

Module information

Declarations
224
Symbols
492

Coverage

37.5 percent of the declarations in Voxels are fully documented54.0 percent of the declarations in Voxels are indirectly documented8.5 percent of the declarations in Voxels are completely undocumented

Declarations

0.4 percent of the declarations in Voxels are global functions or variables0.4 percent of the declarations in Voxels are operators29.0 percent of the declarations in Voxels are initializers, type members, or enum cases46.4 percent of the declarations in Voxels are instance members2.2 percent of the declarations in Voxels are instance subscripts2.7 percent of the declarations in Voxels are protocols5.8 percent of the declarations in Voxels are protocol requirements8.5 percent of the declarations in Voxels are structures1.3 percent of the declarations in Voxels are classes3.1 percent of the declarations in Voxels are typealiases

Interfaces

98.7 percent of the declarations in Voxels are unrestricted1.3 percent of the declarations in Voxels are underscored
Module stats and coverage details

Overview

The library supports storing and manipulating voxels, with convenience functions to convert the data stored within a collection of voxels into surfaces by generating 3D meshes. The general term of art for this process is isosurface extraction, originating from medical image technologies. The library includes implementations of several renderers:

  • simple block mesh, rendering voxels as a cube when they’re determined to be opaque.

  • Marching Cubes, which does simple linear smoothing to represent angles.

  • Surface Net, which treats voxel data as a signed distance field (SDF), to render smooth surfaces.

The library also includes a converter to generate a collection of voxels from a 2D height map (using the Heightmap library) to a collection of voxels.

Voxel Storage

Voxel Updates

Renderers

Converters

Supporting Types

Errors

Sample Data

Code Examples