EntityList.SetCurrent Method
Public Sub SetCurrent( _
ByVal blockReference As BlockReference, _
Optional ByVal updateBoundingBox As Boolean = true _
)
This language is not supported or no code example is available.
Parameters
- blockReference
- BlockReference
The BlockReference to set as current
- 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
If it is null, the current BlockReference is unset.
The BlockReference must be a first-level child of the one that is currently set (i.e. it must be in the Environment.Entities).
When a BlockReference is set as current, the following changes happen:
- The current BlockReference is pushed on the CurrentBlockReferencesData stack.
- The entities of the current scene, minus the current BlockReference, are put in a hidden Block (for internal use).
- The Block.Entities list of the current BlockReference is shared with the Environment.Entities.
- 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.