Optimized voxel map for large, static structures. More...
| Import Statement: | import Clayground.Canvas3D |
| Inherits: |
StaticVoxelMap uses greedy meshing to combine adjacent voxels of the same color into larger quads, significantly reducing vertex count. This makes it ideal for large voxel structures that don't change frequently.
The geometry is regenerated when voxels change, so use DynamicVoxelMap for frequently changing voxel data.
Example usage:
import Clayground.Canvas3D StaticVoxelMap { voxelCountX: 50 voxelCountY: 20 voxelCountZ: 50 voxelSize: 1.0 useToonShading: true Component.onCompleted: { fill({ sphere: { pos: Qt.vector3d(25, 10, 25), radius: 8, colors: ["red", "orange"] } }) } }
See also DynamicVoxelMap and VoxelMapGeometry.
voxelCountX : int |
Number of voxels along the X axis.
voxelCountY : int |
Number of voxels along the Y axis (height).
voxelCountZ : int |
Number of voxels along the Z axis.