Static Methodheckj.voxels 0.2.6Voxels
renderFramedVoxel(idx:scale:inset:)
BlockMeshRenderer.swift:55static func renderFramedVoxel(idx: VoxelIndex, scale: VoxelScale<Float>, inset: Float) -> MeshBuffer
static func renderFramedVoxel(idx: VoxelIndex, scale: VoxelScale<Float>, inset: Float) -> MeshBuffer
s6Voxels17BlockMeshRendererC17renderFramedVoxel3idx5scale5insetAA0C6BufferVAA0G5IndexV_AA0G5ScaleVySfGSftFZ
What are these?13SKK
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.
struct VoxelIndex
The coordinates of a voxel location.
struct VoxelScale<T> where T : SIMDScalar, T : Sendable
A scale that provides a mapping between Voxel coordinates and 3D points.
@frozen struct Float
A single-precision, floating-point value type.
struct MeshBuffer
A buffer of vertex indices, positions and normals that make up a generated 3D mesh.
init()
Creates a block mesh renderer.
static func fastBlockMeshByLayers<VOXEL>(_ voxels: any VoxelAccessible<VOXEL>, scale: VoxelScale<Float>) -> [Int : MeshBuffer] where VOXEL : VoxelBlockRenderable
Returns a collection of mesh buffers, indexed by vertical layer.
func render<VOXEL>(_ voxels: any VoxelAccessible<VOXEL>, scale: VoxelScale<Float>, within bounds: VoxelBounds, surfaceOnly: Bool = false, filter: ((VOXEL) -> Bool)? = nil) -> MeshBuffer where VOXEL : VoxelBlockRenderable
Returns a single mesh for the selected voxels from a collection.