C# Class 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.

Inheritance: Axiom.Core.Resource
Afficher le fichier Open project: mono-soc-2011/axiom Class Usage Examples

Protected Properties

Свойство Type Description
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

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

BspLevel() public méthode

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
Résultat System

BuildQuake3Patches() public méthode

public BuildQuake3Patches ( int vertOffset, int indexOffset ) : void
vertOffset int
indexOffset int
Résultat void

CalculateLoadingStages() public static méthode

public static CalculateLoadingStages ( string filename ) : int
filename string
Résultat int

FindLeaf() public méthode

Walks the entire BSP tree and returns the leaf which contains the given point.
public FindLeaf ( Vector3 point ) : Axiom.SceneManagers.Bsp.BspNode
point Vector3
Résultat Axiom.SceneManagers.Bsp.BspNode

InitQuake3Patches() public méthode

public InitQuake3Patches ( Quake3Level q3lvl, Axiom.Graphics.VertexDeclaration decl ) : void
q3lvl Quake3Level
decl Axiom.Graphics.VertexDeclaration
Résultat void

IsLeafVisible() public méthode

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
Résultat bool

Load() public méthode

public Load ( Stream stream ) : void
stream Stream
Résultat void

LoadEntities() protected méthode

Internal method for parsing chosen entities.
protected LoadEntities ( Quake3Level q3lvl ) : void
q3lvl Quake3Level
Résultat void

LoadQuake3Level() protected méthode

/** Internal utility function for loading data from Quake3.
protected LoadQuake3Level ( Quake3Level q3lvl ) : void
q3lvl Quake3Level
Résultat void

QuakeVertexToBspVertex() protected méthode

protected QuakeVertexToBspVertex ( InternalBspVertex src, BspVertex &dest, TextureLightMap &texLightMap ) : void
src InternalBspVertex
dest BspVertex
texLightMap TextureLightMap
Résultat void

TagNodesWithObject() protected méthode

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
Résultat void

load() protected méthode

Generic load - called by Plugin_BSPSceneManager.BspResourceManager.
protected load ( ) : void
Résultat void

unload() protected méthode

Generic unload - called by BspResourceManager.
protected unload ( ) : void
Résultat void

Property Details

brushes protected_oe property

protected BspBrush[],Axiom.SceneManagers.Bsp brushes
Résultat Axiom.SceneManagers.Bsp.BspBrush[]

bspOptions protected_oe property

protected BspOptions,Axiom.SceneManagers.Bsp bspOptions
Résultat BspOptions

createParam protected_oe property

protected NameValuePairList createParam
Résultat NameValuePairList

faceGroups protected_oe property

Array of face groups, indexed into by contents of mLeafFaceGroups.
protected BspStaticFaceGroup[],Axiom.SceneManagers.Bsp faceGroups
Résultat Axiom.SceneManagers.Bsp.BspStaticFaceGroup[]

indexes protected_oe property

protected HardwareIndexBuffer,Axiom.Graphics indexes
Résultat Axiom.Graphics.HardwareIndexBuffer

leafFaceGroups protected_oe property

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
Résultat int[]

leafStart protected_oe property

protected int leafStart
Résultat int

nodes protected_oe property

protected BspNode[],Axiom.SceneManagers.Bsp nodes
Résultat Axiom.SceneManagers.Bsp.BspNode[]

numIndexes protected_oe property

Indexes for the whole level, will be copied to the real indexdata per frame.
protected int numIndexes
Résultat int

numLeaves protected_oe property

protected int numLeaves
Résultat int

objectToNodeMap protected_oe property

protected MultiMap objectToNodeMap
Résultat BspNode>.MultiMap

patchIndexCount protected_oe property

Total number of indexes required for all patches.
protected int patchIndexCount
Résultat int

patchVertexCount protected_oe property

Total number of vertices required for all patches.
protected int patchVertexCount
Résultat int

patches protected_oe property

Storage of patches
protected AxiomSortedCollection patches
Résultat PatchSurface>.AxiomSortedCollection

playerStarts protected_oe property

protected List playerStarts
Résultat List

vertexData protected_oe property

Vertex data holding all the data for the level, but able to render parts of it/
protected VertexData,Axiom.Graphics vertexData
Résultat Axiom.Graphics.VertexData

visData protected_oe property

protected VisData visData
Résultat VisData