AlphaFramework API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Properties | List of all members
AlphaFramework.World.Terrains.ITerrain Interface Reference

A common base for all ITerrain types. More...

Inheritance diagram for AlphaFramework.World.Terrains.ITerrain:
AlphaFramework.World.Terrains.Terrain< TTemplate >

Public Member Functions

void MarkUntraversableSlopes (bool[,] obstructionMap, int maxTraversableSlope)
 Marks untraversable slopes in a pathfinding "obstruction map". More...
 
void LoadHeightMap (Stream stream)
 Loads data for ITerrain.HeightMap from a stream. More...
 
void LoadHeightMap (string path)
 Loads data for ITerrain.HeightMap from a file. More...
 
void LoadOcclusionIntervalMap (Stream stream)
 Loads data for ITerrain.OcclusionIntervalMap from a stream. More...
 
void LoadOcclusionIntervalMap (string path)
 Loads data for ITerrain.OcclusionIntervalMap from a file. More...
 
void LoadTextureMap (Stream stream)
 Loads data for ITerrain.TextureMap from a stream. More...
 
void LoadTextureMap (string path)
 Loads data for ITerrain.TextureMap from a file. More...
 

Properties

TerrainSize Size [get, set]
 The size of the terrain. More...
 
Vector2 Center [get]
 The world coordinates of the center of the terrain. More...
 
ByteGrid HeightMap [get, set]
 Direct access to the internal height-map array. Handle with care; clone when necessary! More...
 
ByteVector4Grid OcclusionIntervalMap [get, set]
 Direct access to the internal occlusion interval map array. Handle with care; clone when necessary! More...
 
bool OcclusionIntervalMapOutdated [get, set]
 Indicates that the data stored in OcclusionIntervalMap is outdated and should be recalculated using OcclusionIntervalMapGenerator. More...
 
NibbleGrid TextureMap [get, set]
 Direct access to the internal height-map array. Handle with care; clone when necessary! More...
 
bool DataLoaded [get]
 Was the minimum necessary data for the terrain (HeightMap and TextureMap) loaded already? More...
 

Detailed Description

A common base for all ITerrain types.

Member Function Documentation

void AlphaFramework.World.Terrains.ITerrain.LoadHeightMap ( Stream  stream)

Loads data for ITerrain.HeightMap from a stream.

Parameters
streamThe stream to read the height-map from.
Exceptions
IOExceptionThe height-map size is incorrect.

Implemented in AlphaFramework.World.Terrains.Terrain< TTemplate >.

void AlphaFramework.World.Terrains.ITerrain.LoadHeightMap ( string  path)

Loads data for ITerrain.HeightMap from a file.

Parameters
pathThe path of the PNG file to load the height-map from.
Exceptions
IOExceptionThe texture-map size is incorrect.

Implemented in AlphaFramework.World.Terrains.Terrain< TTemplate >.

void AlphaFramework.World.Terrains.ITerrain.LoadOcclusionIntervalMap ( Stream  stream)

Loads data for ITerrain.OcclusionIntervalMap from a stream.

Parameters
streamThe stream to read the occlusion interval map from.
Exceptions
IOExceptionThe occlusion interval map size is incorrect.

Implemented in AlphaFramework.World.Terrains.Terrain< TTemplate >.

void AlphaFramework.World.Terrains.ITerrain.LoadOcclusionIntervalMap ( string  path)

Loads data for ITerrain.OcclusionIntervalMap from a file.

Parameters
pathThe path of the PNG file to load the occlusion interval map from.
Exceptions
IOExceptionThe texture-map size is incorrect.

Implemented in AlphaFramework.World.Terrains.Terrain< TTemplate >.

void AlphaFramework.World.Terrains.ITerrain.LoadTextureMap ( Stream  stream)

Loads data for ITerrain.TextureMap from a stream.

Parameters
streamThe stream to read the texture-map from.
Exceptions
IOExceptionThe texture-map size is incorrect.

Implemented in AlphaFramework.World.Terrains.Terrain< TTemplate >.

void AlphaFramework.World.Terrains.ITerrain.LoadTextureMap ( string  path)

Loads data for ITerrain.TextureMap from a file.

Parameters
pathThe path of the PNG file to load the texture-map from.
Exceptions
IOExceptionThe texture-map size is incorrect.

Implemented in AlphaFramework.World.Terrains.Terrain< TTemplate >.

void AlphaFramework.World.Terrains.ITerrain.MarkUntraversableSlopes ( bool  obstructionMap[,],
int  maxTraversableSlope 
)

Marks untraversable slopes in a pathfinding "obstruction map".

Parameters
obstructionMapThe existing pathfinding "obstruction map" to mark the untraversable slopes in.
maxTraversableSlopeThe maximum slope to considers traversable.

Implemented in AlphaFramework.World.Terrains.Terrain< TTemplate >.

Property Documentation

Vector2 AlphaFramework.World.Terrains.ITerrain.Center
get

The world coordinates of the center of the terrain.

bool AlphaFramework.World.Terrains.ITerrain.DataLoaded
get

Was the minimum necessary data for the terrain (HeightMap and TextureMap) loaded already?

ByteGrid AlphaFramework.World.Terrains.ITerrain.HeightMap
getset

Direct access to the internal height-map array. Handle with care; clone when necessary!

Exceptions
InvalidOperationExceptionThe height-map size is incorrect.

Is not serialized/stored, is loaded by LoadHeightMap(Stream).

ByteVector4Grid AlphaFramework.World.Terrains.ITerrain.OcclusionIntervalMap
getset

Direct access to the internal occlusion interval map array. Handle with care; clone when necessary!

Exceptions
InvalidOperationExceptionThe size is incorrect.

Is not serialized/stored, is loaded by LoadOcclusionIntervalMap(System.IO.Stream).

bool AlphaFramework.World.Terrains.ITerrain.OcclusionIntervalMapOutdated
getset

Indicates that the data stored in OcclusionIntervalMap is outdated and should be recalculated using OcclusionIntervalMapGenerator.

TerrainSize AlphaFramework.World.Terrains.ITerrain.Size
getset

The size of the terrain.

NibbleGrid AlphaFramework.World.Terrains.ITerrain.TextureMap
getset

Direct access to the internal height-map array. Handle with care; clone when necessary!

Exceptions
InvalidOperationExceptionThe height-map size is incorrect.

Is not serialized/stored, is loaded by LoadTextureMap(string).


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