AlphaFramework API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
AlphaFramework.World.Terrains.OcclusionIntervalMapGenerator Class Reference

Generates an occlusion interval map from a height map for a ITerrain as a background task. More...

Inheritance diagram for AlphaFramework.World.Terrains.OcclusionIntervalMapGenerator:
NanoByte::Common::Tasks::TaskBase NanoByte::Common::Tasks::ITask

Public Member Functions

 OcclusionIntervalMapGenerator (ByteGrid heightMap, float stretchH=1, float stretchV=1, double lightSourceInclination=90)
 Prepares to calculate an occlusion interval map for a height-map. More...
 
- Public Member Functions inherited from NanoByte::Common::Tasks::ITask
void Run (CancellationToken cancellationToken=default,[CanBeNull] ICredentialProvider credentialProvider=null,[CanBeNull] IProgress< TaskSnapshot > progress=null)
 

Static Public Member Functions

static
OcclusionIntervalMapGenerator 
FromTerrain (ITerrain terrain, double lightSourceInclination)
 Prepares to calculate an occlusion interval map for the height-map of a ITerrain. More...
 

Public Attributes

override string Name => Resources.CalculatingShadows
 
override bool CanCancel => true
 

Protected Member Functions

override void Execute ()
 

Protected Attributes

override bool UnitsByte => false
 

Properties

ByteVector4Grid Result [get]
 Returns the calculated occlusion end map array once th calculation is complete. More...
 

Detailed Description

Generates an occlusion interval map from a height map for a ITerrain as a background task.

See Also
ITerrain.OcclusionIntervalMap

Constructor & Destructor Documentation

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
heightMapThe height-map data. This is not cloned and must not be modified during calculation!
stretchHA factor by which the terrain is horizontally stretched.
stretchVA factor by which the terrain is vertically stretched.
lightSourceInclinationThe angle of inclination of the sun's path away from the horizon in degrees.

Member Function Documentation

static OcclusionIntervalMapGenerator AlphaFramework.World.Terrains.OcclusionIntervalMapGenerator.FromTerrain ( ITerrain  terrain,
double  lightSourceInclination 
)
inlinestatic

Prepares to calculate an occlusion interval map for the height-map of a ITerrain.

Parameters
terrainThe ITerrain providing the height-map. The height-map is not cloned and must not be modified during calculation!
lightSourceInclinationThe 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 .

Property Documentation

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
InvalidOperationExceptionThe calculation is not complete yet.

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