C# Класс TerrainDisplay.World.World

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
MaxLOSRadius float

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
TryGetMap ( MapId mapId, Map &map ) : bool

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

Описание методов

GetHeightAtPosition() публичный Метод

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.
Результат bool

GetNearestValidPosition() публичный Метод

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.
Результат bool

GetNearestWalkablePositon() публичный Метод

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.
Результат bool

HasLOS() публичный Метод

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.
Результат bool

World() публичный Метод

public World ( ) : System
Результат System

Описание свойств

MaxLOSRadius публичное статическое свойство

public static float MaxLOSRadius
Результат float