Hide menu
Loading...
Searching...
No Matches
cadex.Measurements.BoundingBox Class Reference

Computes a bounding a box of either a scene graph or its subtree. More...

Inherits global.SystemIDisposable.

Public Member Functions

 BoundingBox (global::System.IntPtr cPtr, bool cMemoryOwn)
 
void Dispose ()
 

Static Public Member Functions

static void Compute (cadex.ModelData.Model theModel, cadex.ModelData.Box theBox)
 Computes an axis-aligned bounding box (AABB) of the model.
 
static void Compute (cadex.ModelData.ModelElement theElement, cadex.ModelData.Box theBox)
 Computes an axis-aligned bounding box (AABB) of the model element.
 
static void Compute (cadex.ModelData.Body theBody, cadex.ModelData.Box theBox)
 Computes an axis-aligned bounding box (AABB) of the body.
 
static void Compute (cadex.ModelData.Shape theShape, cadex.Geom.Transformation theTransformation, cadex.ModelData.Box theBox)
 Computes an axis-aligned bounding box (AABB) of the transformed shape.
 
static void Compute (cadex.ModelData.MeshShape theMeshShape, cadex.ModelData.Box theBox, cadex.Geom.Transformation theOutTransformation)
 Computes an axis-aligned bounding box (AABB) of the mesh shape.
 
static void ComputeMin (cadex.ModelData.Shape theShape, cadex.ModelData.Box theBox, cadex.Geom.Transformation theOutTransformation)
 Computes an oriented bounding box (OBB) of the shape.
 
static void ComputeMin (cadex.ModelData.Shape theShape, cadex.Geom.Transformation theTransformation, cadex.ModelData.Box theBox, cadex.Geom.Transformation theOutTransformation)
 Computes an oriented bounding box (OBB) of the transformed shape.
 
static void ComputeOptimal (cadex.ModelData.Model theModel, cadex.ModelData.Box theBox, cadex.Geom.Transformation theOutTransformation)
 Computes an optimal oriented bounding box (OBB) of the model.
 
static void ComputeOptimal (cadex.ModelData.Part thePart, cadex.ModelData.Box theBox, cadex.Geom.Transformation theOutTransformation)
 Computes an optimal oriented bounding box (OBB) of the part.
 
static void ComputeOptimal (cadex.ModelData.Body theBody, cadex.ModelData.Box theBox, cadex.Geom.Transformation theOutTransformation)
 Computes an optimal oriented bounding box (OBB) of the body.
 
static void ComputeOptimal (cadex.ModelData.Shape theShape, cadex.ModelData.Box theBox, cadex.Geom.Transformation theOutTransformation)
 Computes an optimal oriented bounding box (OBB) of the shape.
 
static void ComputeOptimal (cadex.ModelData.MeshShape theMeshShape, cadex.ModelData.Box theBox, cadex.Geom.Transformation theOutTransformation)
 Computes an optimal oriented bounding box (OBB) of the mesh shape.
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Detailed Description

Computes a bounding a box of either a scene graph or its subtree.

Uses a flat vector of parts with individual accumulated transformations.

Computes bounding boxes of objects.

Bounding box can be computed for the following types of objects:

A bounding box of a model is accumulation of bounding boxes of its roots.

A bounding box of an assembly is a cumulative bounding box of its children taking into account their transformation matrices.

A part's bounding box is accumulation of bounding boxes of available part's representations.

Member Function Documentation

◆ Compute() [1/5]

static void cadex.Measurements.BoundingBox.Compute ( cadex.ModelData.Body theBody,
cadex.ModelData.Box theBox )
inlinestatic

Computes an axis-aligned bounding box (AABB) of the body.

◆ Compute() [2/5]

static void cadex.Measurements.BoundingBox.Compute ( cadex.ModelData.MeshShape theMeshShape,
cadex.ModelData.Box theBox,
cadex.Geom.Transformation theOutTransformation )
inlinestatic

Computes an axis-aligned bounding box (AABB) of the mesh shape.

◆ Compute() [3/5]

static void cadex.Measurements.BoundingBox.Compute ( cadex.ModelData.Model theModel,
cadex.ModelData.Box theBox )
inlinestatic

Computes an axis-aligned bounding box (AABB) of the model.

◆ Compute() [4/5]

static void cadex.Measurements.BoundingBox.Compute ( cadex.ModelData.ModelElement theElement,
cadex.ModelData.Box theBox )
inlinestatic

Computes an axis-aligned bounding box (AABB) of the model element.

◆ Compute() [5/5]

static void cadex.Measurements.BoundingBox.Compute ( cadex.ModelData.Shape theShape,
cadex.Geom.Transformation theTransformation,
cadex.ModelData.Box theBox )
inlinestatic

Computes an axis-aligned bounding box (AABB) of the transformed shape.

◆ ComputeMin() [1/2]

static void cadex.Measurements.BoundingBox.ComputeMin ( cadex.ModelData.Shape theShape,
cadex.Geom.Transformation theTransformation,
cadex.ModelData.Box theBox,
cadex.Geom.Transformation theOutTransformation )
inlinestatic

Computes an oriented bounding box (OBB) of the transformed shape.

theTransformation is the input transformation applied to the shape before computing the bounding box.

theOutTransformation specifies the translation and rotation needed to place the input object inside the returned axis-aligned box.

Note
This API is currently in feature preview state and may change.

◆ ComputeMin() [2/2]

static void cadex.Measurements.BoundingBox.ComputeMin ( cadex.ModelData.Shape theShape,
cadex.ModelData.Box theBox,
cadex.Geom.Transformation theOutTransformation )
inlinestatic

Computes an oriented bounding box (OBB) of the shape.

The method estimates the box orientation from the principal axes of inertia. Since ModelData.Box stores an axis-aligned bounding box (AABB), the computed orientation is returned as theOutTransformation.

theOutTransformation specifies the translation and rotation needed to place the input object inside the returned axis-aligned box.

Note
This API is currently in feature preview state and may change.

◆ ComputeOptimal() [1/5]

static void cadex.Measurements.BoundingBox.ComputeOptimal ( cadex.ModelData.Body theBody,
cadex.ModelData.Box theBox,
cadex.Geom.Transformation theOutTransformation )
inlinestatic

Computes an optimal oriented bounding box (OBB) of the body.

The method attemps to determinate the box orientation from the planar faces and linear edges, and falls back to ComputeMin() if no suitable orientation is found.

theOutTransformation specifies the translation and rotation needed to place the input object inside the returned axis-aligned box.

◆ ComputeOptimal() [2/5]

static void cadex.Measurements.BoundingBox.ComputeOptimal ( cadex.ModelData.MeshShape theMeshShape,
cadex.ModelData.Box theBox,
cadex.Geom.Transformation theOutTransformation )
inlinestatic

Computes an optimal oriented bounding box (OBB) of the mesh shape.

Note
For mesh shapes, this method curently returns an axis-aligned bounding box (AABB), and theOutTransformation is the identity transformation.

◆ ComputeOptimal() [3/5]

static void cadex.Measurements.BoundingBox.ComputeOptimal ( cadex.ModelData.Model theModel,
cadex.ModelData.Box theBox,
cadex.Geom.Transformation theOutTransformation )
inlinestatic

Computes an optimal oriented bounding box (OBB) of the model.

The method attemps to determinate the box orientation from the planar faces and linear edges, and falls back to ComputeMin() if no suitable orientation is found.

theOutTransformation specifies the translation and rotation needed to place the input object inside the returned axis-aligned box.

◆ ComputeOptimal() [4/5]

static void cadex.Measurements.BoundingBox.ComputeOptimal ( cadex.ModelData.Part thePart,
cadex.ModelData.Box theBox,
cadex.Geom.Transformation theOutTransformation )
inlinestatic

Computes an optimal oriented bounding box (OBB) of the part.

The method attemps to determinate the box orientation from the planar faces and linear edges, and falls back to ComputeMin() if no suitable orientation is found.

theOutTransformation specifies the translation and rotation needed to place the input object inside the returned axis-aligned box.

◆ ComputeOptimal() [5/5]

static void cadex.Measurements.BoundingBox.ComputeOptimal ( cadex.ModelData.Shape theShape,
cadex.ModelData.Box theBox,
cadex.Geom.Transformation theOutTransformation )
inlinestatic

Computes an optimal oriented bounding box (OBB) of the shape.

The method attemps to determinate the box orientation from the planar faces and linear edges of the shape, and falls back to ComputeMin() if no suitable orientation is found.

theOutTransformation specifies the translation and rotation needed to place the input object inside the returned axis-aligned box.