Class ProvinceTerrainAnalyzer
ENGINE: Analyzes terrain.bmp to determine dominant terrain type per province Uses GPU compute shader for efficient majority voting across all pixels Refactored to use specialized components for RGB lookup, BMP reading, and overrides
public class ProvinceTerrainAnalyzer : MonoBehaviour
- Inheritance
-
objectProvinceTerrainAnalyzer
Methods
AnalyzeAndGetTerrainTypes(RenderTexture, Texture2D, ushort[])
Analyze terrain and return results as array Returns uint[] where [arrayIndex] = terrainTypeIndex (0-255) Main entry point used by MapDataLoader
public uint[] AnalyzeAndGetTerrainTypes(RenderTexture provinceIDTexture, Texture2D terrainTexture, ushort[] provinceIDs)
Parameters
provinceIDTextureRenderTextureterrainTextureTexture2DprovinceIDsushort[]
Returns
- uint[]
Initialize(string)
Initialize terrain analyzer. Called by ArchonEngine after GameSettings is registered.
public void Initialize(string dataDirectory)
Parameters
dataDirectorystring