Click or drag to resize
Ab4d.SharpEngine logo

BoundingBox Structure

Represents an axis-aligned bounding box in three dimensional space.
Inheritance Hierarchy
SystemObject
  SystemValueType
    Ab4d.SharpEngine.CommonBoundingBox

Namespace: Ab4d.SharpEngine.Common
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public struct BoundingBox : IEquatable<BoundingBox>, 
	IFormattable

The BoundingBox type exposes the following members.

Constructors
 NameDescription
Public methodBoundingBox Initializes a new undefined BoundingBox struct.
Public methodBoundingBox(Vector3, Vector3) Initializes a new BoundingBox struct. Both Minimum and Maximum set to float.NaN values.
Top
Properties
 NameDescription
Public propertyIsUndefined Returns true when the Minimum and Maximum properties are not defined (are set to float.NaN).
Public propertyIsZeroSize Returns true when the size of this BoundingBox is zero.
Public propertySizeX Gets size in the X direction
Public propertySizeY Gets size in the Y direction
Public propertySizeZ Gets size in the Z direction
Public propertyStatic memberUndefined Gets an undefined BoundingBox with both Minimum and Maximum set to float.NaN values.
Top
Methods
 NameDescription
Public methodAdd(BoundingBox) Adds another BoundingBox to this BoundingBox
Public methodAdd(Vector3) Adds one Vector3 to this bounds
Public methodContains(BoundingBox) Returns true when the specified BoundingBox is withing this BoundingBox, including its edges.
Public methodContains(Vector3) Returns true when the specified Vector3 is withing this BoundingBox, including its edges.
Public methodContains(Double, Double, Double) Returns true when specified point is within this BoundingBox, including its edges.
Public methodEquals(BoundingBox) Determines whether the specified Vector4 is equal to this instance.
Public methodEquals(BoundingBox) Determines whether the specified Vector4 is equal to this instance.
Public methodEquals(Object) Determines whether the specified Object is equal to this instance.
(Overrides ValueTypeEquals(Object))
Public methodStatic memberFromPoints(Span) 
Public methodStatic memberFromPoints(Vector3) Constructs a BoundingBox that fully contains the given points.
Public methodStatic memberFromPoints(Vector3, Vector3) Constructs a BoundingBox that fully contains the given two points.
Public methodStatic memberFromSphere Constructs a BoundingBox that fully contains the 3D sphere that is specified by the centerPosition and radius.
Public methodStatic memberFromVertices Constructs a BoundingBox that fully contains the given vertices.
Public methodGetCenterPosition Returns center position of this BoundingBox.
Public methodGetCorners Retrieves the eight corners of the bounding box. It is recommended to use the GetCorners(Vector3) that takes a Vector3 array to prevent allocation of new Vector3 array.
Public methodGetCorners(Span) 
Public methodGetCorners(Vector3) Retrieves the eight corners of the bounding box and write them to the specified array of Vector3 that needs to have at least 8 elements.
Public methodGetDiagonalLength Returns the length of the BoundingBox diagonal that is the same as distance from Minimum to Maximum positions.
Public methodGetHashCode Returns a hash code for this instance.
(Overrides ValueTypeGetHashCode)
Public methodGetSize Returns Vector3 that represents size of the BoundingBox
Public methodIntersectsWith Returns a value that indicates whether the specified BoundingBox intersects with this BoundingBox.
Public methodStatic memberMerge(BoundingBox, BoundingBox) Constructs a BoundingBox that is as large as the total combined area of the two specified boxes.
Public methodStatic memberMerge(BoundingBox, BoundingBox, BoundingBox)Obsolete.
Constructs a BoundingBox that is as large as the total combined area of the two specified boxes.
Public methodScaleAndTranslate(Matrix4x4) Returns a new BoundingBox that is created by scaling and translating this BoundingBox with the specified matrix (the current BoundingBox value is not changed). To apply a generic matrix transformation use [!:TransformAllCorners(Matrix4x4)] method.
Public methodScaleAndTranslate(Matrix4x4, Vector3, Vector3)Obsolete.
Sets the out minimum and maximum Vector3D with transforming the current BoundingBox's minimum and maximum value with the specified matrix (the current BoundingBox value is not changed).
Public methodToString Returns a String that represents this instance.
(Overrides ValueTypeToString)
Public methodToString(IFormatProvider) Returns a String that represents this instance.
Public methodToString(String) Returns a String that represents this instance.
Public methodToString(String, IFormatProvider) Returns a String that represents this instance.
Public methodTransform(Matrix4x4) Transforms this BoundingBox with the specified matrix.
Public methodTransform(Transform) Transforms the current BoundingBox with the specified transformation
Public methodTransform(Matrix4x4, BoundingBox) Transforms the current BoundingBox by the specified matrix and writes the transformed BoundingBox to the specified transformedBoundingBox.
Public methodTransform(Transform, BoundingBox) Transforms the current BoundingBox by the specified transformation and writes the transformed BoundingBox to the specified transformedBoundingBox.
Public methodTransform(Matrix4x4, Vector3, Vector3)Obsolete.
Transforms the current BoundingBox with the specified matrix and writes the transformed minimum and maximum positions to the specified parameters.
Public methodTransform(Transform, Vector3, Vector3) Transforms the current BoundingBox with the specified matrix and writes the transformed minimum and maximum positions to the specified parameters.
Public methodTransformAllCorners(Matrix4x4) Returns a new BoundingBox that is created by transforming this BoundingBox bounds with the specified matrix (the current BoundingBox value is not changed). When the transformation matrix contains only translation and scale, you can use an optimized [!:ScaleAndTranslate(Matrix4x4)] method.
Public methodTransformAllCorners(Matrix4x4, Vector3, Vector3)Obsolete.
Sets the out minimum and maximum Vector3D with transforming the current bounds with the specified matrix (the current BoundingBox value is not changed).
Public methodTranslate(Vector3) Returns a new BoundingBox that is created by translating this BoundingBox with the specified translateVector (the current BoundingBox value is not changed).
Public methodTranslate(Vector3, Vector3, Vector3)Obsolete.
Sets the out minimum and maximum Vector3D with translating the current bounds with the specified translateVector (the current BoundingBox value is not changed).
Top
Operators
 NameDescription
Public operatorStatic memberEquality(BoundingBox, BoundingBox) Tests for equality between two objects.
Public operatorStatic memberInequality(BoundingBox, BoundingBox) Tests for inequality between two objects.
Top
Fields
 NameDescription
Public fieldMaximum The maximum point of the box.
Public fieldMinimum The minimum point of the box.
Top
Extension Methods
 NameDescription
Public Extension MethodToRect3D Converts BoundingBox to WPF Rect3D
(Defined by Extensions)
Top
See Also