EntityList.SetCurrentStack Method
When a BlockReference is set as current, the following changes happen:
- A Block is added to the ParentBlocks with the entities of the current scene except the BlockReference that is set as current.
- The Environment.Entities collection contains the current Block entities.
- The current BlockReference is pushed on the CurrentBlockReferencesData stack.
- The BoxMin and BoxMax are updated to consider the new entities, without the CurrentTransformation.
Since the collection is modified, this method can't be called in a Foreach loop.
To add or remove entities from a BlockReference set as current, do it on the Environment.Entities and not on the Block.Entities.
Public Sub SetCurrentStack( _
ByVal parents As Stack(Of BlockReference), _
Optional ByVal updateBoundingBox As Boolean = true _
)
This language is not supported or no code example is available.
Parameters
- parents
- Stack<BlockReference>
The stack of BlockReferences to set as current (the bottom-most is the first parent, which must be in the Environment.Entities, the top-most is the last parent of the hierarchy). If null or empty, the current BlockReference is unset.
- updateBoundingBox
- bool
If true, updates the scene bounding box. Set it to false for better performances in off-screen methods that call this to just use the BlockReference.AccumulatedParentsTransform