ezEngine Release 26.9
Loading...
Searching...
No Matches
ezTerrainData_Voxel Struct Reference

CPU-side state for one voxel terrain volume managed by ezTerrainSystem. More...

#include <TerrainSystem.h>

Public Attributes

bool m_bInUse = false
 
bool m_bDirty = true
 
bool m_bInitialSolid = false
 false = all cells start as air; true = all cells start as solid. Applied before brushes each bake.
 
ezUInt8 m_uiCleanupIterations = 1
 Number of topology-cleanup iterations to run after baking (0–4). Higher values remove more spike voxels at the cost of slightly more GPU work.
 
ezUInt16 m_uiResolution = 32
 User-selected inner voxels per axis (no border, no alignment). Equals the triangulated cell count.
 
ezUInt16 m_uiPackPitch = 5
 Packed X row count = BufX / 8, where BufX = ((m_uiResolution + 2*border + 7) & ~7). Stride for BakedVoxels.
 
float m_fVoxelSize = 1.0f
 World-space size of one voxel.
 
ezTransform m_GlobalTransform = ezTransform::MakeIdentity()
 
ezGALBufferHandle m_hFinalVertices
 StructuredBuffer<VoxelGpuVertex> for rendering.
 
ezGALBufferHandle m_hFinalIndices
 
ezGALBufferHandle m_hFinalDrawArgs
 DrawArgs buffer: 4 uints {IndexCount, 1, 0, 0}. Written by VoxelCompactCopyCS thread 0.
 
float m_fFillHeight = 0.0f
 World-space Z height below which voxels start as solid (when m_bInitialSolid is true).
 
ezTagSet m_Tags
 Identity tags for this voxel volume; matched against brush include-tag filters.
 
ezUInt64 m_uiBrushOverlapHash = 0
 

Detailed Description

CPU-side state for one voxel terrain volume managed by ezTerrainSystem.

Member Data Documentation

◆ m_hFinalIndices

ezGALBufferHandle ezTerrainData_Voxel::m_hFinalIndices

StructuredBuffer<uint> for rendering.

◆ m_hFinalVertices

ezGALBufferHandle ezTerrainData_Voxel::m_hFinalVertices

StructuredBuffer<VoxelGpuVertex> for rendering.

Final render buffers — written from the shared compact scratch by VoxelCompactCopyCS each rebuild. Allocated at worst-case capacity in CreateVoxelTerrain; the copy is GPU-driven (DispatchIndirect) so only the used entries are written, and DrawArgs controls the actual draw count.


The documentation for this struct was generated from the following file: