MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / InitializeHeightMap

Method InitializeHeightMap

Source/Engine/Terrain/TerrainPatch.cpp:1186–1195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1184#endif
1185
1186bool TerrainPatch::InitializeHeightMap()
1187{
1188 PROFILE_CPU_NAMED("Terrain.InitializeHeightMap");
1189 PROFILE_MEM(LevelTerrain);
1190 const auto heightmapSize = _terrain->GetChunkSize() * Terrain::ChunksCountEdge + 1;
1191 Array<float> heightmap;
1192 heightmap.Resize(heightmapSize * heightmapSize);
1193 heightmap.SetAll(0.0f);
1194 return SetupHeightMap(heightmap.Count(), heightmap.Get());
1195}
1196
1197#if TERRAIN_EDITING
1198

Callers 1

InitializePatchMethod · 0.80

Calls 4

ResizeMethod · 0.45
SetAllMethod · 0.45
CountMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected