The AddBBox
method is used to expand the current bounding box (BBox
) to include another bounding box. This operation modifies the current bounding box to encompass the volume of both the original and the specified bounding box.
The AddBBox
method is used to expand the current bounding box (BBox
) to include another bounding box. This operation modifies the current bounding box to encompass the volume of both the original and the specified bounding box.
To use the AddBBox
method, you need to have an instance of BBox
and another BBox
that you want to include within the current bounding box. The method will adjust the current bounding box to ensure it includes the specified bounding box.
// Create two bounding boxes BBox box1 = new BBox(new Vector3(0, 0, 0), new Vector3(1, 1, 1)); BBox box2 = new BBox(new Vector3(1, 1, 1), new Vector3(2, 2, 2)); // Expand box1 to include box2 box1.AddBBox(ref box2); // Now box1 encompasses both its original volume and that of box2