BoundingBox.GetCorners Method (array<Vector3[])

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets an array of points that make up the corners of the BoundingBox.

Namespace:  Microsoft.Xna.Framework
Assembly:  Microsoft.Xna.Framework.Math (in Microsoft.Xna.Framework.Math.dll)

Syntax

'Declaration
Public Sub GetCorners ( _
    corners As Vector3() _
)
public void GetCorners(
    Vector3[] corners
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

corners is nulla null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

You have to have at least 8 elements to copy corners.

Remarks

The points returned correspond to the corners of the BoundingBox faces that are perpendicular to the z-axis. The near face is the face with the larger z value, and the far face is the face with the smaller z value. Points 0 to 3 correspond to the near face in a clockwise order starting at its upper-left corner when looking toward the origin from the positive z direction.

Version Information

Silverlight

Supported in: 5

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.