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
파일 보기 프로젝트 열기: WolfgangSt/axiom 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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