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: 1.0.8740+deb2991acfe86a95cca780cd4f82bcae2805c1a5
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) Constructs a BoundingBox that is as large as the total combined area of the two specified boxes.
Public methodScaleAndTranslate 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 the current BoundingBox with the specified matrix
Public methodTransform(Transform) Transforms the current BoundingBox with the specified transformation
Public methodTransform(Matrix4x4, Vector3, Vector3) 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 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 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