SceneTraversalState
Engine/source/scene/zones/sceneTraversalState.h
Temporary state for zone traversals.
Zone Stack
Return the number of zones that are currently on the traversal stack.
bool
haveVisitedZone(U32 zoneId)
Return true if the given zone has already been visited in the current traversal chain, i.e.
getZoneIdFromStack(U32 depth)
Return the zone ID of the topmost zone on the traversal stack.
getZoneFromStack(U32 depth)
Return the zone space that owns the topmost zone on the traversal stack.
Culling Volume Stack
pushCullingVolume(const SceneCullingVolume & volume)
Push a culling volume onto the stack so that it becomes the current culling volume.
Pop the current culling volume from the stack.
Protected Attributes
Scene culling state.
Stack of culling volumes. Topmost is current volume.
Area of scene visited in traversal.
Stack of zones visited in current traversal chain.
Public Functions
SceneTraversalState(SceneCullingState * cullingState)
Construct an empty scene traversal state.
addToTraversedArea(const Box3F & area)
Add an area to what has been visited so far in the traversal.
Return the scene culling state for this traversal.
Get the scene area that has been visited so far in the traversal.
Detailed Description
Temporary state for zone traversals.
Keeps track of the zones that were visited in the current traversal chain as well as of the total area that so far has been visited in the traversal.
Zone Stack
getTraversalDepth()
Return the number of zones that are currently on the traversal stack.
pushZone(U32 zoneId)
Push a zone onto the traversal stack.
popZone()
Pop the topmost zone from the traversal stack.
haveVisitedZone(U32 zoneId)
Return true if the given zone has already been visited in the current traversal chain, i.e.
if it is currently on the traversal stack.
getZoneIdFromStack(U32 depth)
Return the zone ID of the topmost zone on the traversal stack.
getZoneFromStack(U32 depth)
Return the zone space that owns the topmost zone on the traversal stack.
Culling Volume Stack
pushCullingVolume(const SceneCullingVolume & volume)
Push a culling volume onto the stack so that it becomes the current culling volume.
popCullingVolume()
Pop the current culling volume from the stack.
getCurrentCullingVolume()
Protected Attributes
SceneCullingState * mCullingState
Scene culling state.
Vector< SceneCullingVolume > mCullingVolumeStack
Stack of culling volumes. Topmost is current volume.
Box3F mTraversedArea
Area of scene visited in traversal.
Vector< U32 > mZoneStack
Stack of zones visited in current traversal chain.
Public Functions
SceneTraversalState(SceneCullingState * cullingState)
Construct an empty scene traversal state.
Parameters:
cullingState | Scene culling state. |
addToTraversedArea(const Box3F & area)
Add an area to what has been visited so far in the traversal.
getCullingState()
Return the scene culling state for this traversal.
getTraversedArea()
Get the scene area that has been visited so far in the traversal.