BBox LocalBounds { get; set; }

robot_2Generated
code_blocksInput

Description

The LocalBounds property of a SceneObject represents the axis-aligned bounding box (AABB) of the object, transformed by the object's local transform. This property is useful for determining the spatial extent of the object in its local coordinate space, which can be important for collision detection, rendering optimizations, and spatial queries.

Usage

To access the LocalBounds property, you can simply use the property getter on an instance of SceneObject. This will return a BBox object representing the local bounding box of the scene object.

Example usage:

SceneObject mySceneObject = new SceneObject();
BBox localBounds = mySceneObject.LocalBounds;

In this example, localBounds will contain the axis-aligned bounding box of mySceneObject in its local space.

Example

SceneObject mySceneObject = new SceneObject();
BBox localBounds = mySceneObject.LocalBounds;

// Use localBounds for spatial calculations, such as collision detection
if (localBounds.Contains(new Vector3(0, 0, 0)))
{
    // Do something if the point (0, 0, 0) is within the local bounds
}