Share via


BoundingSphere Structure

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

Defines a sphere.

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

Syntax

'Declaration
Public Structure BoundingSphere
public struct BoundingSphere

The BoundingSphere type exposes the following members.

Constructors

  Name Description
Public method BoundingSphere Creates a new instance of BoundingSphere.

Top

Methods

  Name Description
Public method Contains(BoundingBox) Checks whether the current BoundingSphere contains the specified BoundingBox.
Public method Contains(BoundingFrustum) Checks whether the current BoundingSphere contains the specified BoundingFrustum.
Public method Contains(BoundingSphere) Checks whether the current BoundingSphere contains the specified BoundingSphere.
Public method Contains(Vector3) Checks whether the current BoundingSphere contains the specified point.
Public method Contains(BoundingBox%, ContainmentType%) Checks whether the current BoundingSphere contains the specified BoundingBox.
Public method Contains(BoundingSphere%, ContainmentType%) Checks whether the current BoundingSphere contains the specified BoundingSphere.
Public method Contains(Vector3%, ContainmentType%) Checks whether the current BoundingSphere contains the specified point.
Public methodStatic member CreateFromBoundingBox(BoundingBox) Creates the smallest BoundingSphere that can contain a specified BoundingBox.
Public methodStatic member CreateFromBoundingBox(BoundingBox%, BoundingSphere%) Creates the smallest BoundingSphere that can contain a specified BoundingBox.
Public methodStatic member CreateFromFrustum Creates the smallest BoundingSphere that can contain a specified BoundingFrustum.
Public methodStatic member CreateFromPoints Creates a BoundingSphere that can contain a specified list of points.
Public methodStatic member CreateMerged(BoundingSphere, BoundingSphere) Creates a BoundingSphere that contains the two specified BoundingSphere instances.
Public methodStatic member CreateMerged(BoundingSphere%, BoundingSphere%, BoundingSphere%) Creates a BoundingSphere that contains the two specified BoundingSphere instances.
Public method Equals(Object) Determines whether the specified Object is equal to the BoundingSphere. (Overrides ValueType.Equals(Object).)
Public method Equals(BoundingSphere) Determines whether the specified BoundingSphere is equal to the current BoundingSphere.
Public method GetHashCode Gets the hash code for this instance. (Overrides ValueType.GetHashCode().)
Public method Intersects(BoundingBox) Checks whether the current BoundingSphere intersects with a specified BoundingBox.
Public method Intersects(BoundingFrustum) Checks whether the current BoundingSphere intersects with a specified BoundingFrustum.
Public method Intersects(BoundingSphere) Checks whether the current BoundingSphere intersects with a specified BoundingSphere.
Public method Intersects(Plane) Checks whether the current BoundingSphere intersects with a specified Plane.
Public method Intersects(Ray) Checks whether the current BoundingSphere intersects with a specified Ray.
Public method Intersects(BoundingBox%, Boolean%) Checks whether the current BoundingSphere intersects a BoundingBox.
Public method Intersects(BoundingSphere%, Boolean%) Checks whether the current BoundingSphere intersects another BoundingSphere.
Public method Intersects(Plane%, PlaneIntersectionType%) Checks whether the current BoundingSphere intersects a Plane.
Public method Intersects(Ray%, Nullable<Single>%) Checks whether the current BoundingSphere intersects a Ray.
Public method ToString Returns a String that represents the current BoundingSphere. (Overrides ValueType.ToString().)
Public method Transform(Matrix) Translates and scales the BoundingSphere using a given Matrix.
Public method Transform(Matrix%, BoundingSphere%) Translates and scales the BoundingSphere using a given Matrix.

Top

Operators

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

Top

Fields

  Name Description
Public field Center The center point of the sphere.
Public field Radius The radius of the sphere.

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.