Checks terrain-map projection, view culling and seams against real cube/plot geometry.
Subsystem: Avionics, navigation and flight guidance
Fixture/harness: terraindisplaytests
Setup: The standalone TerrainDisplayTests harness owns the inputs, local helpers and assertion sink used by the case files below. Graphics setup uses NativeUiTest11.
Build/entry point: Tests/TerrainDisplayTests.vcxproj; declared configurations: Debug|Win32.
TerrainDisplayTests.cpp
Source: Tests/TerrainDisplayTests.cpp
Check Map
Fixture: Terrain Display tests
Case symbol: CheckMap
Source: Tests/TerrainDisplayTests.cpp:88
- Test
- Checks every sprite corner follows its actual terrain vertex and compacted tile counts remain valid.
Source check messages (including original failure wording)
-
sprite corner missed its real terrain vertex
-
invalid compacted tile count
-
map coverage regressed beyond available source geometry
Check Lighting Range
Fixture: Terrain Display tests
Case symbol: CheckLightingRange
Source: Tests/TerrainDisplayTests.cpp:154
- Test
- Checks local lighting stays eligible for unknown/nearby terrain bounds and tiles enclosing the vehicle.
Source check messages (including original failure wording)
-
unknown terrain bounds lost local lighting
-
tile enclosing the vehicle lost local lighting
-
near tile edge used the distant shader
-
distant tile used the nearby shader
-
diagonally distant tile used the nearby shader
-
nearby ground lost lighting at a cube face or corner
-
ground far below used the nearby shader
Check Culling
Fixture: Terrain Display tests
Case symbol: CheckCulling
Source: Tests/TerrainDisplayTests.cpp:195
- Test
- Checks GPU-visible triangles are retained across a view-boundary sweep that reproduces the old premature culling.
Source check messages (including original failure wording)
-
a triangle intersecting the current view was culled
-
culling sweep did not exercise its boundaries
-
old flat-index cull did not reproduce premature disappearance
Check Boundary Cases
Fixture: Terrain Display tests
Case symbol: CheckBoundaryCases
Source: Tests/TerrainDisplayTests.cpp:270
- Test
- Checks boundary validation and rejects missing data while retaining boxes enclosing the view.
Source check messages (including original failure wording)
-
cell boundary validation failed
-
missing diagonal was painted as data
-
cleared tile was painted
-
unknown bounds must fail open
-
box enclosing view with all corners outside was rejected
-
wholly outside geometry was retained
-
overhanging structure was culled using its origin
Check Alignment
Fixture: Terrain Display tests
Case symbol: CheckAlignment
Source: Tests/TerrainDisplayTests.cpp:293
- Test
- Check Alignment: terrain does not use waypoint bearing/zoom/nonuniform display scale; terrain elevation displaced its map footprint; terrain range and ring scale disagree.
Source check messages (including original failure wording)
-
terrain does not use waypoint bearing/zoom/nonuniform display scale
-
terrain elevation displaced its map footprint
-
terrain range and ring scale disagree
Check Seam Movement
Fixture: Terrain Display tests
Case symbol: CheckSeamMovement
Source: Tests/TerrainDisplayTests.cpp:324
- Test
- Checks continuous common-corner geometry while movement crosses all three adjoining faces.
Source check messages (including original failure wording)
-
face crossing lost the common corner vertex
-
map jumped when the packet face changed
-
movement did not cross all three faces
Check Sprite Rendering
Fixture: Terrain Display tests
Case symbol: CheckSpriteRendering
Source: Tests/TerrainDisplayTests.cpp:360
- Test
- Checks rendered terrain topology against a fixture that reproduces the former flat-net quadrant problem.
Source check messages (including original failure wording)
-
sprite creation failed
-
real terrain texture unavailable
-
flat-net visual did not reproduce the quadrant
-
native D3D11 sprite left cracks in projected cells
-
range rings failed
-
font creation failed
Entry-point checks
Fixture: Terrain Display tests
Case symbol: wmain
Source: Tests/TerrainDisplayTests.cpp:436
- Test
- Checks face/plot projection and the PM closing adjacency at (2038,-1), then runs the terrain seam/culling scenarios.
Source check messages (including original failure wording)
-
PM closing adjacency regressed at (2038,-1)
-
NP closing edge regression