Class BoundingFrustumD
Defines a frustum and helps determine whether forms intersect with it.
Inheritance
Namespace: VRageMath
Assembly: VRage.Math.dll
Syntax
public class BoundingFrustumD : Object, IEquatable<BoundingFrustumD>
Constructors
BoundingFrustumD()
Declaration
public BoundingFrustumD()
BoundingFrustumD(MatrixD)
Creates a new instance of BoundingFrustumD.
Declaration
public BoundingFrustumD(MatrixD value)
Parameters
Type | Name | Description |
---|---|---|
MatrixD | value | Combined matrix that usually takes view × projection matrix. |
Fields
CornerCount
Specifies the total number of corners (8) in the BoundingFrustumD.
Declaration
public const int CornerCount = 8
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
Bottom
Gets the bottom plane of the BoundingFrustumD.
Declaration
public PlaneD Bottom { get; }
Property Value
Type | Description |
---|---|
PlaneD |
Far
Gets the far plane of the BoundingFrustumD.
Declaration
public PlaneD Far { get; }
Property Value
Type | Description |
---|---|
PlaneD |
Item[Int32]
Declaration
public PlaneD this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
PlaneD |
Left
Gets the left plane of the BoundingFrustumD.
Declaration
public PlaneD Left { get; }
Property Value
Type | Description |
---|---|
PlaneD |
Matrix
Gets or sets the Matrix that describes this bounding frustum.
Declaration
public MatrixD Matrix { get; set; }
Property Value
Type | Description |
---|---|
MatrixD |
Near
Gets the near plane of the BoundingFrustumD.
Declaration
public PlaneD Near { get; }
Property Value
Type | Description |
---|---|
PlaneD |
Right
Gets the right plane of the BoundingFrustumD.
Declaration
public PlaneD Right { get; }
Property Value
Type | Description |
---|---|
PlaneD |
Top
Gets the top plane of the BoundingFrustumD.
Declaration
public PlaneD Top { get; }
Property Value
Type | Description |
---|---|
PlaneD |
Methods
Contains(BoundingBoxD)
Checks whether the current BoundingFrustumD contains the specified BoundingBoxD.
Declaration
public ContainmentType Contains(BoundingBoxD box)
Parameters
Type | Name | Description |
---|---|---|
BoundingBoxD | box | The BoundingBoxD to check against the current BoundingFrustumD. |
Returns
Type | Description |
---|---|
ContainmentType |
Contains(ref BoundingBoxD, out ContainmentType)
Checks whether the current BoundingFrustumD contains the specified BoundingBoxD.
Declaration
public void Contains(ref BoundingBoxD box, out ContainmentType result)
Parameters
Type | Name | Description |
---|---|---|
BoundingBoxD | box | The BoundingBoxD to test for overlap. |
ContainmentType | result | [OutAttribute] Enumeration indicating the extent of overlap. |
Contains(BoundingFrustumD)
Checks whether the current BoundingFrustumD contains the specified BoundingFrustumD.
Declaration
public ContainmentType Contains(BoundingFrustumD frustum)
Parameters
Type | Name | Description |
---|---|---|
BoundingFrustumD | frustum | The BoundingFrustumD to check against the current BoundingFrustumD. |
Returns
Type | Description |
---|---|
ContainmentType |
Contains(BoundingSphereD)
Checks whether the current BoundingFrustumD contains the specified BoundingSphere.
Declaration
public ContainmentType Contains(BoundingSphereD sphere)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphereD | sphere | The BoundingSphere to check against the current BoundingFrustumD. |
Returns
Type | Description |
---|---|
ContainmentType |
Contains(ref BoundingSphereD, out ContainmentType)
Checks whether the current BoundingFrustumD contains the specified BoundingSphere.
Declaration
public void Contains(ref BoundingSphereD sphere, out ContainmentType result)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphereD | sphere | The BoundingSphere to test for overlap. |
ContainmentType | result | [OutAttribute] Enumeration indicating the extent of overlap. |
Contains(Vector3D)
Checks whether the current BoundingFrustumD contains the specified point.
Declaration
public ContainmentType Contains(Vector3D point)
Parameters
Type | Name | Description |
---|---|---|
Vector3D | point | The point to check against the current BoundingFrustumD. |
Returns
Type | Description |
---|---|
ContainmentType |
Contains(ref Vector3D, out ContainmentType)
Checks whether the current BoundingFrustumD contains the specified point.
Declaration
public void Contains(ref Vector3D point, out ContainmentType result)
Parameters
Type | Name | Description |
---|---|---|
Vector3D | point | The point to test for overlap. |
ContainmentType | result | [OutAttribute] Enumeration indicating the extent of overlap. |
Equals(Object)
Determines whether the specified Object is equal to the BoundingFrustumD.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The Object to compare with the current BoundingFrustumD. |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(BoundingFrustumD)
Determines whether the specified BoundingFrustumD is equal to the current BoundingFrustumD.
Declaration
public bool Equals(BoundingFrustumD other)
Parameters
Type | Name | Description |
---|---|---|
BoundingFrustumD | other | The BoundingFrustumD to compare with the current BoundingFrustumD. |
Returns
Type | Description |
---|---|
System.Boolean |
GetCorners()
Gets an array of points that make up the corners of the BoundingFrustumD. ALLOCATION!
Declaration
public Vector3D[] GetCorners()
Returns
Type | Description |
---|---|
Vector3D[] |
GetCorners(Vector3D[])
Gets an array of points that make up the corners of the BoundingFrustumD.
Declaration
public void GetCorners(Vector3D[] corners)
Parameters
Type | Name | Description |
---|---|---|
Vector3D[] | corners | An existing array of at least 8 Vector3D points where the corners of the BoundingFrustumD are written. |
GetCornersUnsafe(Vector3D*)
Gets the array of points that make up the corners of the BoundingBox.
Declaration
public void GetCornersUnsafe(Vector3D*corners)
Parameters
Type | Name | Description |
---|---|---|
Vector3D* | corners | An existing array of at least 8 Vector3 points where the corners of the BoundingBox are written. |
GetHashCode()
Gets the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Intersects(BoundingBoxD)
Checks whether the current BoundingFrustumD intersects the specified BoundingBoxD.
Declaration
public bool Intersects(BoundingBoxD box)
Parameters
Type | Name | Description |
---|---|---|
BoundingBoxD | box | The BoundingBoxD to check for intersection. |
Returns
Type | Description |
---|---|
System.Boolean |
Intersects(ref BoundingBoxD, out Boolean)
Checks whether the current BoundingFrustumD intersects a BoundingBoxD.
Declaration
public void Intersects(ref BoundingBoxD box, out bool result)
Parameters
Type | Name | Description |
---|---|---|
BoundingBoxD | box | The BoundingBoxD to check for intersection with. |
System.Boolean | result | [OutAttribute] true if the BoundingFrustumD and BoundingBoxD intersect; false otherwise. |
Intersects(BoundingFrustumD)
Checks whether the current BoundingFrustumD intersects the specified BoundingFrustumD.
Declaration
public bool Intersects(BoundingFrustumD frustum)
Parameters
Type | Name | Description |
---|---|---|
BoundingFrustumD | frustum | The BoundingFrustumD to check for intersection. |
Returns
Type | Description |
---|---|
System.Boolean |
Intersects(BoundingSphereD)
Checks whether the current BoundingFrustumD intersects the specified BoundingSphere.
Declaration
public bool Intersects(BoundingSphereD sphere)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphereD | sphere | The BoundingSphere to check for intersection. |
Returns
Type | Description |
---|---|
System.Boolean |
Intersects(ref BoundingSphereD, out Boolean)
Checks whether the current BoundingFrustumD intersects a BoundingSphere.
Declaration
public void Intersects(ref BoundingSphereD sphere, out bool result)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphereD | sphere | The BoundingSphere to check for intersection with. |
System.Boolean | result | [OutAttribute] true if the BoundingFrustumD and BoundingSphere intersect; false otherwise. |
Intersects(PlaneD)
Checks whether the current BoundingFrustumD intersects the specified Plane.
Declaration
public PlaneIntersectionType Intersects(PlaneD plane)
Parameters
Type | Name | Description |
---|---|---|
PlaneD | plane | The Plane to check for intersection. |
Returns
Type | Description |
---|---|
PlaneIntersectionType |
Intersects(ref PlaneD, out PlaneIntersectionType)
Checks whether the current BoundingFrustumD intersects a Plane.
Declaration
public void Intersects(ref PlaneD plane, out PlaneIntersectionType result)
Parameters
Type | Name | Description |
---|---|---|
PlaneD | plane | The Plane to check for intersection with. |
PlaneIntersectionType | result | [OutAttribute] An enumeration indicating whether the BoundingFrustumD intersects the Plane. |
Intersects(RayD)
Checks whether the current BoundingFrustumD intersects the specified Ray.
Declaration
public Nullable<double> Intersects(RayD ray)
Parameters
Type | Name | Description |
---|---|---|
RayD | ray | The Ray to check for intersection. |
Returns
Type | Description |
---|---|
System.Nullable<System.Double> |
Intersects(ref RayD, out Nullable<Double>)
Checks whether the current BoundingFrustumD intersects a Ray.
Declaration
public void Intersects(ref RayD ray, out Nullable<double> result)
Parameters
Type | Name | Description |
---|---|---|
RayD | ray | The Ray to check for intersection with. |
System.Nullable<System.Double> | result | [OutAttribute] Distance at which the ray intersects the BoundingFrustumD or null if there is no intersection. |
ToString()
Returns a String that represents the current BoundingFrustumD.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Operators
Equality(BoundingFrustumD, BoundingFrustumD)
Determines whether two instances of BoundingFrustumD are equal.
Declaration
public static bool operator ==(BoundingFrustumD a, BoundingFrustumD b)
Parameters
Type | Name | Description |
---|---|---|
BoundingFrustumD | a | The BoundingFrustumD to the left of the equality operator. |
BoundingFrustumD | b | The BoundingFrustumD to the right of the equality operator. |
Returns
Type | Description |
---|---|
System.Boolean |
Inequality(BoundingFrustumD, BoundingFrustumD)
Determines whether two instances of BoundingFrustumD are not equal.
Declaration
public static bool operator !=(BoundingFrustumD a, BoundingFrustumD b)
Parameters
Type | Name | Description |
---|---|---|
BoundingFrustumD | a | The BoundingFrustumD to the left of the inequality operator. |
BoundingFrustumD | b | The BoundingFrustumD to the right of the inequality operator. |
Returns
Type | Description |
---|---|
System.Boolean |