Generates an occlusion interval map from a height map for a ITerrain as a background task.
More...
Generates an occlusion interval map from a height map for a ITerrain as a background task.
- See also
- ITerrain.OcclusionIntervalMap
◆ OcclusionIntervalMapGenerator()
AlphaFramework.World.Terrains.OcclusionIntervalMapGenerator.OcclusionIntervalMapGenerator |
( |
ByteGrid |
heightMap, |
|
|
float |
stretchH = 1 , |
|
|
float |
stretchV = 1 , |
|
|
double |
lightSourceInclination = 90 |
|
) |
| |
|
inline |
Prepares to calculate an occlusion interval map for a height-map.
- Parameters
-
heightMap | The height-map data. This is not cloned and must not be modified during calculation! |
stretchH | A factor by which the terrain is horizontally stretched. |
stretchV | A factor by which the terrain is vertically stretched. |
lightSourceInclination | The angle of inclination of the sun's path away from the horizon in degrees. |
◆ FromTerrain()
Prepares to calculate an occlusion interval map for the height-map of a ITerrain.
- Parameters
-
terrain | The ITerrain providing the height-map. The height-map is not cloned and must not be modified during calculation! |
lightSourceInclination | The angle of inclination of the sun's path away from the horizon in degrees. |
- Returns
- The newly crated occlusion interval map generator.
The results are not automatically written back to terrain .
◆ Result
ByteVector4Grid AlphaFramework.World.Terrains.OcclusionIntervalMapGenerator.Result |
|
get |
Returns the calculated occlusion end map array once th calculation is complete.
A light rise angles is the minimum vertical angle (0 = 0°, 255 = 90°) which a directional light must achieve to be not occluded.
- Exceptions
-
InvalidOperationException | The calculation is not complete yet. |
The documentation for this class was generated from the following file:
- World/Terrains/OcclusionIntervalMapGenerator.cs