BBox Bounds { get; set; }

robot_2Generated
code_blocksInput

Description

The Bounds property of a SceneObject allows you to set or retrieve the axis-aligned bounding box (AABB) for the object. This bounding box is used to define the spatial limits of the object in the scene, which can be useful for collision detection, visibility testing, and other spatial queries.

Usage

To use the Bounds property, you can simply access it directly from an instance of SceneObject. You can assign a new BBox to it to update the bounding box, or retrieve the current BBox to inspect the object's spatial limits.

Example

// Example of setting the Bounds property
SceneObject mySceneObject = new SceneObject();
BBox newBounds = new BBox(new Vector3(-1, -1, -1), new Vector3(1, 1, 1));
mySceneObject.Bounds = newBounds;

// Example of getting the Bounds property
BBox currentBounds = mySceneObject.Bounds;
Vector3 min = currentBounds.Mins;
Vector3 max = currentBounds.Maxs;