Class OBBCalculator
Object-Oriented 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 OBBCalculator : Visitor<SceneNode, SceneComponent>
Constructors
OBBCalculator(SceneContainer)
Initializes a new instance of the AABBCalculator class.
Declaration
public OBBCalculator(SceneContainer sc)
Parameters
Type | Name | Description |
---|---|---|
SceneContainer | sc | The scene container to calculate an axis-aligned bounding box for. |
OBBCalculator(SceneNode)
Initializes a new instance of the OBBCalculator class.
Declaration
public OBBCalculator(SceneNode snc)
Parameters
Type | Name | Description |
---|---|---|
SceneNode | snc | A single scene node to calculate an axis-aligned bounding box for. |
OBBCalculator(IEnumerable<SceneNode>)
Initializes a new instance of the OBBCalculator class.
Declaration
public OBBCalculator(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 OBBf GetBox()
Returns
Type | Description |
---|---|
OBBf | 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()