MarchingCubesRenderer
A renderer that implements the marching cubes algorithm to create a 3D mesh from voxel data.
class MarchingCubesRenderer
A renderer that implements the marching cubes algorithm to create a 3D mesh from voxel data.
class MarchingCubesRenderer
import Voxels
A Swift library for storage, manipulation, export, and 3D rendering of Voxel data.
class BlockMeshRenderer
A renderer for creating block 3D meshes of opaque voxels.
protocol VoxelBlockRenderable
A type that can be rendered as opaque blocks.
class SurfaceNetRenderer
A renderer for creating smooth 3D meshes of the surface of signed distance value (SDF) data.
protocol VoxelSurfaceRenderable
A type that can be rendered as a surface.
init()
static func normalizedOffset(_ f0: Float, _ f1: Float) -> Float
Determines a normalized offset value for linear interpolation from two values on either side of 0, with 0 being the point to interpolate towards. The provided values are required to have opposite signs (one negative, one positive) in order to use 0 as the marker for the interpolation direction.
func edge_to_boundary_vertex(edge: Int, cornerValues: [Float], index: VoxelIndex, adaptive: Bool = false, homeworkMode: Bool = false) -> Vector
Returns a vertex in the middle of the specified edge of a voxel cube.
func render<VOXEL>(_ data: any VoxelAccessible<VOXEL>, scale: VoxelScale<Float>, within bounds: VoxelBounds, adaptive: Bool = false) -> MeshBuffer where VOXEL : VoxelSurfaceRenderable