Description
The LocalBounds
property of a SceneObject
provides the axis-aligned bounding box (AABB) of the object in its local space. This property translates the world bounds to the local position of the object, but it does not account for any scaling or rotation transformations that may be applied to the object.
Usage
Use the LocalBounds
property when you need to determine the bounding box of a SceneObject
relative to its local position. This can be useful for collision detection, visibility checks, or spatial queries within the local coordinate system of the object.
Example
// Example of accessing the LocalBounds property
SceneObject mySceneObject = new SceneObject();
BBox localBounds = mySceneObject.LocalBounds;
// Use localBounds for further calculations or logic
Vector3 min = localBounds.Mins;
Vector3 max = localBounds.Maxs;
// Example: Check if a point is within the local bounds
Vector3 point = new Vector3(1, 1, 1);
bool isWithinBounds = localBounds.Contains(point);