Export (0) Print
Expand All

BoundingBox.GetCorners Method (Vector3[])

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

Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

public void GetCorners (
         Vector3[] corners
)

Parameters

corners
An existing array of at least 8 Vector3 points where the corners of the BoundingBox are written.

Exception typeCondition
ArgumentNullException corners is null.
ArgumentOutOfRangeExceptionYou have to have at least 8 elements to copy corners.

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. Points 4 to 7 correspond to the far face in a clockwise order starting at its upper-left corner when looking toward the origin from the positive z direction.

Xbox 360, Windows XP SP2, Windows Vista, Zune

Community Additions

ADD
Show:
© 2014 Microsoft