Share via


BoundingFrustum Class

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

Defines a frustum and helps determine whether forms intersect with it.

Inheritance Hierarchy

System.Object
  Microsoft.Xna.Framework.BoundingFrustum

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

Syntax

'Declaration
Public Class BoundingFrustum
public class BoundingFrustum

The BoundingFrustum type exposes the following members.

Constructors

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

Top

Properties

  Name Description
Public property Bottom Gets the bottom plane of the BoundingFrustum.
Public property Far Gets the far plane of the BoundingFrustum.
Public property Left Gets the left plane of the BoundingFrustum.
Public property Matrix Gets or sets the Matrix that describes this bounding frustum.
Public property Near Gets the near plane of the BoundingFrustum.
Public property Right Gets the right plane of the BoundingFrustum.
Public property Top Gets the top plane of the BoundingFrustum.

Top

Methods

  Name Description
Public method Contains(BoundingBox) Checks whether the current BoundingFrustum contains the specified BoundingBox.
Public method Contains(BoundingFrustum) Checks whether the current BoundingFrustum contains the specified BoundingFrustum.
Public method Contains(BoundingSphere) Checks whether the current BoundingFrustum contains the specified BoundingSphere.
Public method Contains(Vector3) Checks whether the current BoundingFrustum contains the specified point.
Public method Contains(BoundingBox%, ContainmentType%) Checks whether the current BoundingFrustum contains the specified BoundingBox.
Public method Contains(BoundingSphere%, ContainmentType%) Checks whether the current BoundingFrustum contains the specified BoundingSphere.
Public method Contains(Vector3%, ContainmentType%) Checks whether the current BoundingFrustum contains the specified point.
Public method Equals(Object) Determines whether the specified Object is equal to the BoundingFrustum. (Overrides Object.Equals(Object).)
Public method Equals(BoundingFrustum) Determines whether the specified BoundingFrustum is equal to the current BoundingFrustum.
Public method GetCorners() Gets an array of points that make up the corners of the BoundingFrustum.
Public method GetCorners(array<Vector3[]) Gets an array of points that make up the corners of the BoundingFrustum.
Public method GetHashCode Gets the hash code for this instance. (Overrides Object.GetHashCode().)
Public method Intersects(BoundingBox) Checks whether the current BoundingFrustum intersects the specified BoundingBox.
Public method Intersects(BoundingFrustum) Checks whether the current BoundingFrustum intersects the specified BoundingFrustum.
Public method Intersects(BoundingSphere) Checks whether the current BoundingFrustum intersects the specified BoundingSphere.
Public method Intersects(Plane) Checks whether the current BoundingFrustum intersects the specified Plane.
Public method Intersects(Ray) Checks whether the current BoundingFrustum intersects the specified Ray.
Public method Intersects(BoundingBox%, Boolean%) Checks whether the current BoundingFrustum intersects a BoundingBox.
Public method Intersects(BoundingSphere%, Boolean%) Checks whether the current BoundingFrustum intersects a BoundingSphere.
Public method Intersects(Plane%, PlaneIntersectionType%) Checks whether the current BoundingFrustum intersects a Plane.
Public method Intersects(Ray%, Nullable<Single>%) Checks whether the current BoundingFrustum intersects a Ray.
Public method ToString Returns a String that represents the current BoundingFrustum. (Overrides Object.ToString().)

Top

Operators

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

Top

Fields

  Name Description
Public fieldStatic member CornerCount Specifies the total number of corners (8) in the BoundingFrustum.

Top

Remarks

A frustum in computer graphics is generally a volume of 3D space, defined as the part of a rectangular pyramid that lies between two planes perpendicular to its center line. A frustum is often used to represent what a "camera" sees in your 3D space.

The BoundingFrustum class allows you to define a bounding frustum using a combined matrix that is generally the product of a view matrix and a projection matrix.

You can query a BoundingFrustum object for any one of its bounding planes, for its corners, and for whether it intersects with a given object. Since objects that don't intersect with your view frustrum generally don't need to be rendered, culling them quickly can save you a lot of rendering time.

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.