BoundingBox Structure

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

Defines an axis-aligned box-shaped 3D volume.

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

Syntax

'Declaration
Public Structure BoundingBox
public struct BoundingBox

The BoundingBox type exposes the following members.

Constructors

  Name Description
Public method BoundingBox Creates an instance of BoundingBox.

Top

Methods

  Name Description
Public method Contains(BoundingBox) Tests whether the BoundingBox contains another BoundingBox.
Public method Contains(BoundingFrustum) Tests whether the BoundingBox contains a BoundingFrustum.
Public method Contains(BoundingSphere) Tests whether the BoundingBox contains a BoundingSphere.
Public method Contains(Vector3) Tests whether the BoundingBox contains a point.
Public method Contains(BoundingBox%, ContainmentType%) Tests whether the BoundingBox contains a BoundingBox.
Public method Contains(BoundingSphere%, ContainmentType%) Tests whether the BoundingBox contains a BoundingSphere.
Public method Contains(Vector3%, ContainmentType%) Tests whether the BoundingBox contains a point.
Public methodStatic member CreateFromPoints Creates the smallest BoundingBox that will contain a group of points.
Public methodStatic member CreateFromSphere(BoundingSphere) Creates the smallest BoundingBox that will contain the specified BoundingSphere.
Public methodStatic member CreateFromSphere(BoundingSphere%, BoundingBox%) Creates the smallest BoundingBox that will contain the specified BoundingSphere.
Public methodStatic member CreateMerged(BoundingBox, BoundingBox) Creates the smallest BoundingBox that contains the two specified BoundingBox instances.
Public methodStatic member CreateMerged(BoundingBox%, BoundingBox%, BoundingBox%) Creates the smallest BoundingBox that contains the two specified BoundingBox instances.
Public method Equals(Object) Determines whether two instances of BoundingBox are equal. (Overrides ValueType.Equals(Object).)
Public method Equals(BoundingBox) Determines whether two instances of BoundingBox are equal.
Public method GetCorners() Gets an array of points that make up the corners of the BoundingBox.
Public method GetCorners(array<Vector3[]) Gets an array of points that make up the corners of the BoundingBox.
Public method GetHashCode Gets the hash code for this instance. (Overrides ValueType.GetHashCode().)
Public method Intersects(BoundingBox) Checks whether the current BoundingBox intersects another BoundingBox.
Public method Intersects(BoundingFrustum) Checks whether the current BoundingBox intersects a BoundingFrustum.
Public method Intersects(BoundingSphere) Checks whether the current BoundingBox intersects a BoundingSphere.
Public method Intersects(Plane) Checks whether the current BoundingBox intersects a Plane.
Public method Intersects(Ray) Checks whether the current BoundingBox intersects a Ray.
Public method Intersects(BoundingBox%, Boolean%) Checks whether the current BoundingBox intersects another BoundingBox.
Public method Intersects(BoundingSphere%, Boolean%) Checks whether the current BoundingBox intersects a BoundingSphere.
Public method Intersects(Plane%, PlaneIntersectionType%) Checks whether the current BoundingBox intersects a Plane.
Public method Intersects(Ray%, Nullable<Single>%) Checks whether the current BoundingBox intersects a Ray.
Public method ToString Returns a String that represents the current BoundingBox. (Overrides ValueType.ToString().)

Top

Operators

  Name Description
Public operatorStatic member Equality Determines whether two instances of BoundingBox are equal.
Public operatorStatic member Inequality Determines whether two instances of BoundingBox are not equal.

Top

Fields

  Name Description
Public fieldStatic member CornerCount Specifies the total number of corners (8) in the BoundingBox.
Public field Max The maximum point the BoundingBox contains.
Public field Min The minimum point the BoundingBox contains.

Top

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.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.