bool Contains( BBox& b )
bool Contains( Vector3& b )

robot_2Generated
code_blocksInput

Description

The Contains method determines whether a specified bounding box (BBox) is completely contained within the current bounding box instance. This method is useful for spatial queries where you need to check if one bounding box is entirely within another.

Usage

To use the Contains method, you need to have two BBox instances. Call the method on the bounding box that you want to check for containment, passing the other bounding box as a reference parameter.

Example

// Create two BBox instances
BBox outerBox = new BBox(new Vector3(0, 0, 0), new Vector3(10, 10, 10));
BBox innerBox = new BBox(new Vector3(2, 2, 2), new Vector3(5, 5, 5));

// Check if the outerBox contains the innerBox
bool isContained = outerBox.Contains(ref innerBox);

// Output the result
if (isContained)
{
    // innerBox is completely within outerBox
}
else
{
    // innerBox is not completely within outerBox
}