C# Класс Axiom.Components.Terrain.TerrainGroup

Helper class to assist you in managing multiple terrain instances that are connected to each other.
Наследование: DisposableObject, WorkQueue.IRequestHandler, WorkQueue.IResponseHandler
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
ChunkID uint
ChunkVersion ushort

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

Метод Описание
BoxIntersects ( AxisAlignedBox box, List &terrainList ) : void

ConvertTerrainSlotToWorldPosition ( long x, long y, Vector3 &position ) : void

ConvertWorldPositionToTerrainSlot ( Vector3 position, long &x, long &y ) : void

DefineTerrain ( long x, long y ) : void

Define a 'slot' in the terrain grid - in this case to be loaded from a generated file name.

DefineTerrain ( long x, long y, Image image ) : void

DefineTerrain ( long x, long y, Image image, List layers ) : void

DefineTerrain ( long x, long y, ImportData importData ) : void

DefineTerrain ( long x, long y, float constantHeight ) : void

Define a 'slot' in the terrain grid - in this case a flat terrain.

DefineTerrain ( long x, long y, float data, List layers ) : void

DefineTerrain ( long x, long y, string filename ) : void

Dispose ( ) : void

FreeTemporaryResources ( ) : void

GenerateFilename ( long x, long y ) : string

GetHeightAtWorldPosition ( Vector3 position ) : float

GetHeightAtWorldPosition ( Vector3 pos, Terrain &terrain ) : float

GetHeightAtWorldPosition ( float x, float y, float z ) : float

GetHeightAtWorldPosition ( float x, float y, float z, Terrain &terrain ) : float

GetTerrain ( long x, long y ) : Terrain

GetTerrainDefinition ( long x, long y ) : TerrainSlotDefinition

LoadAllTerrains ( ) : void

Load any terrain instances that have been defined but not loaded yet.

LoadAllTerrains ( bool synchronous ) : void

Load any terrain instances that have been defined but not loaded yet.

LoadGroupDefinition ( StreamSerializer &stream ) : void

LoadGroupDefinition ( string filename ) : void

LoadTerrain ( long x, long y ) : void

LoadTerrain ( long x, long y, bool synchronous ) : void

PackIndex ( long x, long y ) : uint

RayIntersects ( Ray ray ) : RayResult

RayIntersects ( Ray ray, float distanceLimit ) : RayResult

RemoveAllTerrains ( ) : void

RemoveTerrain ( long x, long y ) : void

SaveAllTerrains ( bool onlyIfModified ) : void

SaveAllTerrains ( bool onlyIfModified, bool replaceManualFilenames ) : void

SaveGroupDefinition ( StreamSerializer &stream ) : void

SaveGroupDefinition ( string filename ) : void

SetFilenamConvention ( string prefix, string extension ) : void

Set the naming convention for file names in this terrain group.

SphereIntersects ( Sphere sphere, List &terrainList ) : void

/

Swap ( float oba, float obb ) : void

Swaps to objects. be sure they have the same type

TerrainGroup ( SceneManager sm ) : System

Alternate constructor. *important* You can ONLY use this constructor if you subsequently call loadGroupDefinition to populate the rest. *important*

TerrainGroup ( SceneManager sm, Alignment align, ushort terrainSize, float terrainWorldSize ) : System

Constructor.

UnloadTerrain ( long x, long y ) : void

UnpackIndex ( uint key, long &x, long &y ) : void

Update ( ) : void

Trigger the update process for all terrain instances.

Update ( bool synchronous ) : void

Trigger the update process for all terrain instances.

UpdateDerivedData ( ) : void

UpdateDerivedData ( bool synchronous ) : void

UpdateDerivedData ( bool synchronous, byte typeMask ) : void

UpdateGeometry ( ) : void

Performs an update on all terrain geometry.

Защищенные методы

Метод Описание
ConnectNeighbour ( TerrainSlot slot, long offsetx, long offsety ) : void

GetTerrainSlot ( long x, long y ) : TerrainSlot

GetTerrainSlot ( long x, long y, bool createIfMissing ) : TerrainSlot

GetTerrainSlotPosition ( long x, long y ) : Vector3

LoadTerrainImpl ( TerrainSlot slot ) : void
LoadTerrainImpl ( TerrainSlot slot, bool synchronous ) : void

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

BoxIntersects() публичный метод

public BoxIntersects ( AxisAlignedBox box, List &terrainList ) : void
box Axiom.Math.AxisAlignedBox
terrainList List
Результат void

ConnectNeighbour() защищенный метод

protected ConnectNeighbour ( TerrainSlot slot, long offsetx, long offsety ) : void
slot TerrainSlot
offsetx long
offsety long
Результат void

ConvertTerrainSlotToWorldPosition() публичный метод

public ConvertTerrainSlotToWorldPosition ( long x, long y, Vector3 &position ) : void
x long
y long
position Vector3
Результат void

ConvertWorldPositionToTerrainSlot() публичный метод

public ConvertWorldPositionToTerrainSlot ( Vector3 position, long &x, long &y ) : void
position Vector3
x long
y long
Результат void

DefineTerrain() публичный метод

Define a 'slot' in the terrain grid - in this case to be loaded from a generated file name.
public DefineTerrain ( long x, long y ) : void
x long The coordinates of the terrain slot relative to the centre slot (signed).
y long The coordinates of the terrain slot relative to the centre slot (signed).
Результат void

DefineTerrain() публичный метод

public DefineTerrain ( long x, long y, Image image ) : void
x long
y long
image Image
Результат void

DefineTerrain() публичный метод

public DefineTerrain ( long x, long y, Image image, List layers ) : void
x long
y long
image Image
layers List
Результат void

DefineTerrain() публичный метод

public DefineTerrain ( long x, long y, ImportData importData ) : void
x long
y long
importData ImportData
Результат void

DefineTerrain() публичный метод

Define a 'slot' in the terrain grid - in this case a flat terrain.
public DefineTerrain ( long x, long y, float constantHeight ) : void
x long The coordinates of the terrain slot relative to the centre slot (signed).
y long The coordinates of the terrain slot relative to the centre slot (signed).
constantHeight float /// The constant, uniform height that you want the terrain /// to start at ///
Результат void

DefineTerrain() публичный метод

public DefineTerrain ( long x, long y, float data, List layers ) : void
x long
y long
data float
layers List
Результат void

DefineTerrain() публичный метод

public DefineTerrain ( long x, long y, string filename ) : void
x long
y long
filename string
Результат void

Dispose() публичный метод

public Dispose ( ) : void
Результат void

FreeTemporaryResources() публичный метод

public FreeTemporaryResources ( ) : void
Результат void

GenerateFilename() публичный метод

public GenerateFilename ( long x, long y ) : string
x long
y long
Результат string

GetHeightAtWorldPosition() публичный метод

public GetHeightAtWorldPosition ( Vector3 position ) : float
position Vector3
Результат float

GetHeightAtWorldPosition() публичный метод

public GetHeightAtWorldPosition ( Vector3 pos, Terrain &terrain ) : float
pos Vector3
terrain Terrain
Результат float

GetHeightAtWorldPosition() публичный метод

public GetHeightAtWorldPosition ( float x, float y, float z ) : float
x float
y float
z float
Результат float

GetHeightAtWorldPosition() публичный метод

public GetHeightAtWorldPosition ( float x, float y, float z, Terrain &terrain ) : float
x float
y float
z float
terrain Terrain
Результат float

GetTerrain() публичный метод

public GetTerrain ( long x, long y ) : Terrain
x long
y long
Результат Terrain

GetTerrainDefinition() публичный метод

public GetTerrainDefinition ( long x, long y ) : TerrainSlotDefinition
x long
y long
Результат TerrainSlotDefinition

GetTerrainSlot() защищенный метод

protected GetTerrainSlot ( long x, long y ) : TerrainSlot
x long
y long
Результат TerrainSlot

GetTerrainSlot() защищенный метод

protected GetTerrainSlot ( long x, long y, bool createIfMissing ) : TerrainSlot
x long
y long
createIfMissing bool
Результат TerrainSlot

GetTerrainSlotPosition() защищенный метод

protected GetTerrainSlotPosition ( long x, long y ) : Vector3
x long
y long
Результат Vector3

LoadAllTerrains() публичный метод

Load any terrain instances that have been defined but not loaded yet.
public LoadAllTerrains ( ) : void
Результат void

LoadAllTerrains() публичный метод

Load any terrain instances that have been defined but not loaded yet.
public LoadAllTerrains ( bool synchronous ) : void
synchronous bool
Результат void

LoadGroupDefinition() публичный метод

public LoadGroupDefinition ( StreamSerializer &stream ) : void
stream StreamSerializer
Результат void

LoadGroupDefinition() публичный метод

public LoadGroupDefinition ( string filename ) : void
filename string
Результат void

LoadTerrain() публичный метод

public LoadTerrain ( long x, long y ) : void
x long
y long
Результат void

LoadTerrain() публичный метод

public LoadTerrain ( long x, long y, bool synchronous ) : void
x long
y long
synchronous bool
Результат void

LoadTerrainImpl() защищенный метод

protected LoadTerrainImpl ( TerrainSlot slot ) : void
slot TerrainSlot
Результат void

LoadTerrainImpl() защищенный метод

protected LoadTerrainImpl ( TerrainSlot slot, bool synchronous ) : void
slot TerrainSlot
synchronous bool
Результат void

PackIndex() публичный метод

public PackIndex ( long x, long y ) : uint
x long
y long
Результат uint

RayIntersects() публичный метод

public RayIntersects ( Ray ray ) : RayResult
ray Ray
Результат RayResult

RayIntersects() публичный метод

public RayIntersects ( Ray ray, float distanceLimit ) : RayResult
ray Ray
distanceLimit float
Результат RayResult

RemoveAllTerrains() публичный метод

public RemoveAllTerrains ( ) : void
Результат void

RemoveTerrain() публичный метод

public RemoveTerrain ( long x, long y ) : void
x long
y long
Результат void

SaveAllTerrains() публичный метод

public SaveAllTerrains ( bool onlyIfModified ) : void
onlyIfModified bool
Результат void

SaveAllTerrains() публичный метод

public SaveAllTerrains ( bool onlyIfModified, bool replaceManualFilenames ) : void
onlyIfModified bool
replaceManualFilenames bool
Результат void

SaveGroupDefinition() публичный метод

public SaveGroupDefinition ( StreamSerializer &stream ) : void
stream StreamSerializer
Результат void

SaveGroupDefinition() публичный метод

public SaveGroupDefinition ( string filename ) : void
filename string
Результат void

SetFilenamConvention() публичный метод

Set the naming convention for file names in this terrain group.
public SetFilenamConvention ( string prefix, string extension ) : void
prefix string
extension string
Результат void

SphereIntersects() публичный метод

/
public SphereIntersects ( Sphere sphere, List &terrainList ) : void
sphere Sphere
terrainList List
Результат void

Swap() публичный метод

Swaps to objects. be sure they have the same type
public Swap ( float oba, float obb ) : void
oba float
obb float
Результат void

TerrainGroup() публичный метод

Alternate constructor. *important* You can ONLY use this constructor if you subsequently call loadGroupDefinition to populate the rest. *important*
public TerrainGroup ( SceneManager sm ) : System
sm SceneManager The SceneManager which will parent the terrain instances.
Результат System

TerrainGroup() публичный метод

Constructor.
public TerrainGroup ( SceneManager sm, Alignment align, ushort terrainSize, float terrainWorldSize ) : System
sm SceneManager The SceneManager which will parent the terrain instances.
align Alignment The alignment that all terrain instances will use
terrainSize ushort The size of each terrain down one edge in vertices (2^n+1)
terrainWorldSize float The world size of each terrain instance
Результат System

UnloadTerrain() публичный метод

public UnloadTerrain ( long x, long y ) : void
x long
y long
Результат void

UnpackIndex() публичный метод

public UnpackIndex ( uint key, long &x, long &y ) : void
key uint
x long
y long
Результат void

Update() публичный метод

Trigger the update process for all terrain instances.
public Update ( ) : void
Результат void

Update() публичный метод

Trigger the update process for all terrain instances.
public Update ( bool synchronous ) : void
synchronous bool
Результат void

UpdateDerivedData() публичный метод

public UpdateDerivedData ( ) : void
Результат void

UpdateDerivedData() публичный метод

public UpdateDerivedData ( bool synchronous ) : void
synchronous bool
Результат void

UpdateDerivedData() публичный метод

public UpdateDerivedData ( bool synchronous, byte typeMask ) : void
synchronous bool
typeMask byte
Результат void

UpdateGeometry() публичный метод

Performs an update on all terrain geometry.
public UpdateGeometry ( ) : void
Результат void

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

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

public static uint ChunkID
Результат uint

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

public static ushort ChunkVersion
Результат ushort