C# Class TerrainDisplay.World.World

Exibir arquivo Open project: WCell/WCell-Terrain

Public Properties

Property Type Description
MaxLOSRadius float

Public Methods

Method Description
GetHeightAtPosition ( MapId mapId, System.Vector3 pos, float &height ) : bool

Get the height of the floor underneath the given position on the map with the given MapId.

GetNearestValidPosition ( MapId mapId, System.Vector3 pos, System.Vector3 &validPos ) : bool

Gets the nearest valid (i.e., not over a hole, outside map boundaries, etc) position to the given position.

GetNearestWalkablePositon ( MapId mapId, System.Vector3 pos, System.Vector3 &walkablePos ) : bool

Gets the nearest walkable (i.e., not water, model, air, etc) position to the given position.

HasLOS ( MapId mapId, System.Vector3 pos1, System.Vector3 pos2 ) : bool

Checks of the two positions have a clear line of sight on the given MapId.

World ( ) : System

Private Methods

Method Description
TryGetMap ( MapId mapId, Map &map ) : bool

Tries to retrieve/load the map from/into the maps Dictionary.

Method Details

GetHeightAtPosition() public method

Get the height of the floor underneath the given position on the map with the given MapId.
public GetHeightAtPosition ( MapId mapId, System.Vector3 pos, float &height ) : bool
mapId MapId The that corresponds to the desired map.
pos System.Vector3 The position on the map to get the height at.
height float The height of the floor at the given position on the map.
return bool

GetNearestValidPosition() public method

Gets the nearest valid (i.e., not over a hole, outside map boundaries, etc) position to the given position.
public GetNearestValidPosition ( MapId mapId, System.Vector3 pos, System.Vector3 &validPos ) : bool
mapId MapId The that corresponds to the desired map.
pos System.Vector3 The position to check against.
validPos System.Vector3 The nearest valid position to the given position.
return bool

GetNearestWalkablePositon() public method

Gets the nearest walkable (i.e., not water, model, air, etc) position to the given position.
public GetNearestWalkablePositon ( MapId mapId, System.Vector3 pos, System.Vector3 &walkablePos ) : bool
mapId MapId The that corresponds to the desired map.
pos System.Vector3 The position to check against.
walkablePos System.Vector3 The nearest walkable position to the given position.
return bool

HasLOS() public method

Checks of the two positions have a clear line of sight on the given MapId.
public HasLOS ( MapId mapId, System.Vector3 pos1, System.Vector3 pos2 ) : bool
mapId MapId The that corresponds to the desired map.
pos1 System.Vector3 The start position for the LOS check.
pos2 System.Vector3 The end position for the LOS check.
return bool

World() public method

public World ( ) : System
return System

Property Details

MaxLOSRadius public_oe static_oe property

public static float MaxLOSRadius
return float