Skip to main content

Module voxel_editor

Module voxel_editor 

Source

Structs§

BrushSettings
ChunkCoord
DebrisParticle
Debris particle from destroyed voxel.
DungeonRoom
GeneratedMesh
GridStats
LightCell
LodOctreeSet
MeshBuilder
MeshVertex
MinecraftChunkSection
PerlinNoise3D
QEF
QEF (Quadric Error Function) for dual contouring. Minimize ||Ax - b||^2 where A is the matrix of normals and b = A*intersection_points
SparseVoxelOctree
StructuralCell
Simple beam model for structural integrity.
TreeGenerator
VolumetricFogGrid
Voxel
VoxelClipboard
VoxelEditor
VoxelGrid
VoxelLightGrid
VoxelLodStreamer
VoxelMaterial
VoxelNode
VoxelPainter
VoxelRaycastResult
VoxelSDF
VoxelStamp
Pre-defined stamp patterns for voxel brushes.
VoxelUndoHistory
VoxelUndoState
VoxelWorld

Enums§

Biome
Biome system: per-voxel-column biome assignment based on noise.
EditorTool
MirrorAxis
OctreeNode
PaintBlendMode
SculptOp

Constants§

MC_EDGE_TABLE
Full 256-entry edge table for marching cubes. Each entry is a bitmask of the 12 edges that are intersected for that case.
MC_EDGE_VERTICES
Edge vertex pairs for marching cubes.
MC_TRI_TABLE
Triangle table: for each of 256 cases, list of edge indices forming triangles. We store as arrays of i8, -1 = end of list. 256 rows, 16 columns max.
MC_VERTEX_OFFSETS
Cube vertex offsets for marching cubes (dx, dy, dz).

Functions§

apply_destruction
Destruction: remove voxels below strength threshold, return debris positions.
apply_sculpt_mirrored
Apply a sculpt operation with mirror symmetry.
apply_sculpt_op
bake_voxel_ambient_occlusion
blend_materials
Blend two materials at a boundary.
child_index
Child index encoding: 3 bits per level (xyz). child_index(dx, dy, dz) = dx | (dy << 1) | (dz << 2)
child_offset
classify_biome
colorize_by_stress
compute_structural_integrity
compute_surface_normals
count_visible_faces
decimate_mesh
Simple edge-collapse mesh decimation (Garland-Heckbert style, simplified).
default_material_table
deserialize_voxel_world
dual_contouring
Dual contouring: feature-preserving mesh extraction.
export_heightmap
export_mesh_obj
export_raw_binary
Export voxel grid as raw binary (widthheightdepth bytes for material, separate density).
export_rle
Export using RLE compression.
flood_fill_select
Flood-fill selection starting from a seed voxel. Returns set of grid coordinates.
generate_biome_terrain
generate_caves
Cave system using worm algorithm (random walk erosion).
generate_dungeon
generate_ore_veins
Ore vein generation using fractal noise thresholding.
generate_tangents
generate_terrain
Generate Perlin terrain in a VoxelGrid.
generate_triplanar_uvs
greedy_mesh
Greedy meshing: merge adjacent coplanar quad faces.
grid_normal
Estimate normal at a grid point using central differences.
hydraulic_erosion
import_heightmap
Import heightmap (2D array of heights) and extrude to 3D.
import_raw_binary
import_rle
is_face_visible
Check if a voxel face is visible (has an air neighbor).
marching_cubes
Run marching cubes on a VoxelGrid.
marching_cubes_material_blend
merge_octree_lod
node_average_material
Compute average material of all leaves in a subtree.
ray_dda
raycast_voxel_grid
rle_decode
rle_encode
Run-length encoding for sparse voxel data.
rotate_clipboard_90_xz
select_by_density_range
select_by_material
select_surface_voxels
serialize_voxel_world
smooth_grid
spawn_debris
update_debris
voxel_astar
A* pathfinding on voxel grid.
voxel_to_sdf
Generate a signed distance field approximation from voxel grid.