C# Класс Axiom.SceneManagers.Bsp.BspLevel

Holds all the data associated with a Binary Space Parition (BSP) based indoor level.
The data used here is populated by loading level files via the BspLevelManager.Load method, although application users are more likely to call SceneManager.SetWorldGeometry which will automatically arrange the loading of the level. Note that this assumes that you have asked for an indoor-specialized SceneManager (specify SceneType.Indoor when calling Engine.GetSceneManager).

We currently only support loading from Quake3 Arena level files, although any source that can be converted into this classes structure could also be used. The Quake3 level load process is in a different class called Quake3Level to keep the specifics separate.

Наследование: Axiom.Core.Resource
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
brushes Axiom.SceneManagers.Bsp.BspBrush[]
bspOptions BspOptions
createParam NameValuePairList
faceGroups Axiom.SceneManagers.Bsp.BspStaticFaceGroup[]
indexes Axiom.Graphics.HardwareIndexBuffer
leafFaceGroups int[]
leafStart int
nodes Axiom.SceneManagers.Bsp.BspNode[]
numIndexes int
numLeaves int
objectToNodeMap BspNode>.MultiMap
patchIndexCount int
patchVertexCount int
patches PatchSurface>.AxiomSortedCollection
playerStarts List
vertexData Axiom.Graphics.VertexData
visData VisData

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

Метод Описание
BspLevel ( ResourceManager parent, string name, System.UInt64 handle, string group, bool isManual, IManualResourceLoader loader, NameValuePairList createParams ) : System

Default constructor - used by BspResourceManager (do not call directly).

BuildQuake3Patches ( int vertOffset, int indexOffset ) : void
CalculateLoadingStages ( string filename ) : int
FindLeaf ( Vector3 point ) : Axiom.SceneManagers.Bsp.BspNode

Walks the entire BSP tree and returns the leaf which contains the given point.

InitQuake3Patches ( Quake3Level q3lvl, Axiom.Graphics.VertexDeclaration decl ) : void
IsLeafVisible ( Axiom.SceneManagers.Bsp.BspNode from, Axiom.SceneManagers.Bsp.BspNode to ) : bool

Determines if one leaf node is visible from another.

Load ( Stream stream ) : void

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

Метод Описание
LoadEntities ( Quake3Level q3lvl ) : void

Internal method for parsing chosen entities.

LoadQuake3Level ( Quake3Level q3lvl ) : void

/** Internal utility function for loading data from Quake3.

QuakeVertexToBspVertex ( InternalBspVertex src, BspVertex &dest, TextureLightMap &texLightMap ) : void
TagNodesWithObject ( Axiom.SceneManagers.Bsp.BspNode node, Axiom.Core.MovableObject obj, Vector3 pos ) : void
load ( ) : void

Generic load - called by Plugin_BSPSceneManager.BspResourceManager.

unload ( ) : void

Generic unload - called by BspResourceManager.

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

Метод Описание
NotifyObjectDetached ( Axiom.Core.MovableObject obj ) : void

Internal method, makes sure an object is removed from the leaves when detached from a node.

NotifyObjectMoved ( Axiom.Core.MovableObject obj, Vector3 pos ) : void

Ensures that the Axiom.Core.SceneObject is attached to the right leaves of the BSP tree.

calculateLoadingStages ( Stream stream ) : int

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

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

Default constructor - used by BspResourceManager (do not call directly).
public BspLevel ( ResourceManager parent, string name, System.UInt64 handle, string group, bool isManual, IManualResourceLoader loader, NameValuePairList createParams ) : System
parent Axiom.Core.ResourceManager
name string
handle System.UInt64
group string
isManual bool
loader IManualResourceLoader
createParams NameValuePairList
Результат System

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

public BuildQuake3Patches ( int vertOffset, int indexOffset ) : void
vertOffset int
indexOffset int
Результат void

CalculateLoadingStages() публичный статический метод

public static CalculateLoadingStages ( string filename ) : int
filename string
Результат int

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

Walks the entire BSP tree and returns the leaf which contains the given point.
public FindLeaf ( Vector3 point ) : Axiom.SceneManagers.Bsp.BspNode
point Vector3
Результат Axiom.SceneManagers.Bsp.BspNode

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

public InitQuake3Patches ( Quake3Level q3lvl, Axiom.Graphics.VertexDeclaration decl ) : void
q3lvl Quake3Level
decl Axiom.Graphics.VertexDeclaration
Результат void

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

Determines if one leaf node is visible from another.
public IsLeafVisible ( Axiom.SceneManagers.Bsp.BspNode from, Axiom.SceneManagers.Bsp.BspNode to ) : bool
from Axiom.SceneManagers.Bsp.BspNode
to Axiom.SceneManagers.Bsp.BspNode
Результат bool

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

public Load ( Stream stream ) : void
stream Stream
Результат void

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

Internal method for parsing chosen entities.
protected LoadEntities ( Quake3Level q3lvl ) : void
q3lvl Quake3Level
Результат void

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

/** Internal utility function for loading data from Quake3.
protected LoadQuake3Level ( Quake3Level q3lvl ) : void
q3lvl Quake3Level
Результат void

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

protected QuakeVertexToBspVertex ( InternalBspVertex src, BspVertex &dest, TextureLightMap &texLightMap ) : void
src InternalBspVertex
dest BspVertex
texLightMap TextureLightMap
Результат void

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

protected TagNodesWithObject ( Axiom.SceneManagers.Bsp.BspNode node, Axiom.Core.MovableObject obj, Vector3 pos ) : void
node Axiom.SceneManagers.Bsp.BspNode
obj Axiom.Core.MovableObject
pos Vector3
Результат void

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

Generic load - called by Plugin_BSPSceneManager.BspResourceManager.
protected load ( ) : void
Результат void

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

Generic unload - called by BspResourceManager.
protected unload ( ) : void
Результат void

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

brushes защищенное свойство

protected BspBrush[],Axiom.SceneManagers.Bsp brushes
Результат Axiom.SceneManagers.Bsp.BspBrush[]

bspOptions защищенное свойство

protected BspOptions,Axiom.SceneManagers.Bsp bspOptions
Результат BspOptions

createParam защищенное свойство

protected NameValuePairList createParam
Результат NameValuePairList

faceGroups защищенное свойство

Array of face groups, indexed into by contents of mLeafFaceGroups.
protected BspStaticFaceGroup[],Axiom.SceneManagers.Bsp faceGroups
Результат Axiom.SceneManagers.Bsp.BspStaticFaceGroup[]

indexes защищенное свойство

protected HardwareIndexBuffer,Axiom.Graphics indexes
Результат Axiom.Graphics.HardwareIndexBuffer

leafFaceGroups защищенное свойство

Array of indexes into the faceGroups array. This buffer is organised by leaf node so leaves can just use contiguous chunks of it and get repointed to the actual entries in faceGroups.
protected int[] leafFaceGroups
Результат int[]

leafStart защищенное свойство

protected int leafStart
Результат int

nodes защищенное свойство

protected BspNode[],Axiom.SceneManagers.Bsp nodes
Результат Axiom.SceneManagers.Bsp.BspNode[]

numIndexes защищенное свойство

Indexes for the whole level, will be copied to the real indexdata per frame.
protected int numIndexes
Результат int

numLeaves защищенное свойство

protected int numLeaves
Результат int

objectToNodeMap защищенное свойство

protected MultiMap objectToNodeMap
Результат BspNode>.MultiMap

patchIndexCount защищенное свойство

Total number of indexes required for all patches.
protected int patchIndexCount
Результат int

patchVertexCount защищенное свойство

Total number of vertices required for all patches.
protected int patchVertexCount
Результат int

patches защищенное свойство

Storage of patches
protected AxiomSortedCollection patches
Результат PatchSurface>.AxiomSortedCollection

playerStarts защищенное свойство

protected List playerStarts
Результат List

vertexData защищенное свойство

Vertex data holding all the data for the level, but able to render parts of it/
protected VertexData,Axiom.Graphics vertexData
Результат Axiom.Graphics.VertexData

visData защищенное свойство

protected VisData visData
Результат VisData