Class AABBCalculator
Axis-Aligned Bounding Box Calculator. Use instances of this class to calculate axis-aligned bounding boxes on scenes, list of scene nodes or individual scene nodes. Calculations always include any child nodes.
Inherited Members
Namespace: Fusee.Engine.Core
Assembly: Fusee.Engine.Core.dll
Syntax
public class AABBCalculator : Visitor<SceneNode, SceneComponent>
Constructors
AABBCalculator(SceneContainer)
Initializes a new instance of the AABBCalculator class.
Declaration
public AABBCalculator(SceneContainer sc)
Parameters
Type | Name | Description |
---|---|---|
SceneContainer | sc | The scene container to calculate an axis-aligned bounding box for. |
AABBCalculator(SceneNode)
Initializes a new instance of the AABBCalculator class.
Declaration
public AABBCalculator(SceneNode snc)
Parameters
Type | Name | Description |
---|---|---|
SceneNode | snc | A single scene node to calculate an axis-aligned bounding box for. |
AABBCalculator(IEnumerable<SceneNode>)
Initializes a new instance of the AABBCalculator class.
Declaration
public AABBCalculator(IEnumerable<SceneNode> sncList)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<SceneNode> | sncList | The list of scene nodes to calculate an axis-aligned bounding box for. |
Methods
GetBox()
Performs the calculation and returns the resulting box on the object(s) passed in the constructor. Any calculation always includes a full traversal over all child nodes.
Declaration
public AABBf? GetBox()
Returns
Type | Description |
---|---|
System.Nullable<AABBf> | The resulting axis-aligned bounding box. |
InitState()
Method is called when traversal starts to initialize the traversal state.
Declaration
protected override void InitState()
Overrides
OnMesh(Mesh)
Do not call. Used for internal traversal purposes only
Declaration
public void OnMesh(Mesh mesh)
Parameters
Type | Name | Description |
---|---|---|
Mesh | mesh | The mesh component. |
OnTransform(Transform)
Do not call. Used for internal traversal purposes only
Declaration
public void OnTransform(Transform transform)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | The transform component. |
PopState()
Method is called when going up one hierarchy level while traversing.
Declaration
protected override void PopState()
Overrides
PushState()
Method is called when going down one hierarchy level while traversing.
Declaration
protected override void PushState()