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

CPU-side state for one heightfield patch managed by ezTerrainSystem. More...

#include <TerrainSystem.h>

Public Attributes

bool m_bInUse = false
 
bool m_bDirty = true
 
ezUInt16 m_uiCellsPerSide = 128
 Number of rendered quads per side (= resolution enum value).
 
ezTransform m_GlobalTransform = ezTransform::MakeIdentity()
 
ezGALBufferHandle m_hBakedHeights
 Persistent, bound as UAV in heights CS and SRV in VS.
 
ezGALBufferHandle m_hBakedNormals
 Persistent, bound as UAV in normals CS and SRV in VS.
 
ezGALBufferHandle m_hCellMaterials
 Per-cell top-3 material indices (uint/cell), baked by Step3 CS. SRV in VS.
 
ezGALBufferHandle m_hVertexWeights
 Per-vertex f16 blend weights relative to cell top-3 (uint/vertex), baked by Step3 CS. SRV in VS.
 
ezUInt8 m_uiDefaultMaterialIndex = 0
 
ezImageDataResourceHandle m_hHeightImage
 Optional greyscale image used as baseline height source; sampled each bake.
 
ezVec2 m_vImageOffset = ezVec2::MakeZero()
 UV offset into m_hHeightImage; selects the top-left corner of the sampled rect.
 
ezVec2 m_vImageSize = ezVec2(1.0f)
 UV extent of the sampled rect within m_hHeightImage. Values < 1 select a sub-region.
 
float m_fHeightScale = 0.0f
 Multiplier applied to the [0, 1] greyscale sample to produce a world-space height.
 
float m_fGridSpacing = 1.0f
 
ezTagSet m_Tags
 
ezUInt64 m_uiBrushOverlapHash = 0
 

Detailed Description

CPU-side state for one heightfield patch managed by ezTerrainSystem.

Member Data Documentation

◆ m_Tags

ezTagSet ezTerrainData_Heightfield::m_Tags

Identity tags for this heightfield; matched against brush include-tag filters.

◆ m_uiBrushOverlapHash

ezUInt64 ezTerrainData_Heightfield::m_uiBrushOverlapHash = 0

Hash of the indices of brushes that spatially overlap this heightfield. Updated each time brush state is re-evaluated; compared against the previous value to skip re-bakes when the set of relevant brushes (and whether any are present) has not changed.


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