Struct BoundingBox
Contents
[
Hide
]BoundingBox structure
The axis-aligned bounding box
public struct BoundingBox
Constructors
| Name | Description |
|---|---|
| BoundingBox(Vector3, Vector3) | Initialize a finite bounding box with given minimum and maximum corner |
| BoundingBox(double, double, double, double, double, double) | Initialize a finite bounding box with given minimum and maximum corner |
Properties
| Name | Description |
|---|---|
| static Infinite { get; } | The infinite bounding box |
| static Null { get; } | The null bounding box |
| Center { get; } | The center of the bounding box. |
| Extent { get; } | Gets the extent of the bounding box. |
| Maximum { get; } | The maximum corner of the bounding box |
| Minimum { get; } | The minimum corner of the bounding box |
| Size { get; } | The size of the bounding box |
Methods
| Name | Description |
|---|---|
| static FromGeometry(Geometry) | Construct a bounding box from given geometry |
| Contains(BoundingBox) | The bounding box to check if it’s inside current bounding box. |
| Contains(Vector3) | Check if the point p is inside the bounding box |
| override Equals(object) | Determines if two objects are equal |
| override GetHashCode() | Returns the hash code for this instance |
| Merge(BoundingBox) | Merges the new box into the current bounding box. |
| Merge(Vector3) | Merge current bounding box with given point |
| Merge(Vector4) | Merge current bounding box with given point |
| Merge(double, double, double) | Merge current bounding box with given point |
| OverlapsWith(BoundingBox) | Check if current bounding box overlaps with specified bounding box. |
| Scale() | Calculates the absolute largest coordinate value of any contained point. |
| override ToString() | Gets the string representation of the bounding box. |
| operator * | Operator overloading for multiply, new bounding box’s minimum and maximum corner will be transformed by the matrix. |
Examples
The following code shows how to get a bounding box from an Entity instance.
var sphere = new Sphere();
var boundingBox = sphere.GetBoundingBox();
Console.WriteLine("Bounding box = " + boundingBox);
See Also
- namespace Aspose.ThreeD.Utilities
- assembly Aspose.3D