Generated by DocFX

Class BoundingBox

Represents the value of two points in a bounding box defined by the two extreme corner points.

Inheritance
System.Object
BoundingBox
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Syntax
public class BoundingBox

Constructors

| Improve this Doc View Source

BoundingBox(Point3, Point3)

Constructs a new bounding box from two corner points.

Declaration
public BoundingBox(Point3 min, Point3 max)
Parameters
Type Name Description
Point3 min

Point containing all the minimum coordinates.

Point3 max

Point containing all the maximum coordinates.

| Improve this Doc View Source

BoundingBox(IList<Point3>, Plane)

Constructs a BoundingBox from a list of points.

Declaration
public BoundingBox(IList<Point3> pts, Plane orientation = null)
Parameters
Type Name Description
System.Collections.Generic.IList<Point3> pts

Collection of points will be contained in the BoundingBox.

Plane orientation

Orientation plane.

Properties

| Improve this Doc View Source

IsValid

Gets if the BoundingBox is valid.

Declaration
public bool IsValid { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Max

The maximum point of the BoundingBox. The coordinates of this point are always bigger than min.

Declaration
public Point3 Max { get; }
Property Value
Type Description
Point3
| Improve this Doc View Source

Min

The minimum point of the BoundingBox. The coordinates of this point are always smaller than max.

Declaration
public Point3 Min { get; }
Property Value
Type Description
Point3
| Improve this Doc View Source

Unset

Gets a BoundingBox that has Unset coordinates for ParameterA and ParameterB.

Declaration
public static BoundingBox Unset { get; }
Property Value
Type Description
BoundingBox

Methods

| Improve this Doc View Source

AreOverlapping(BoundingBox, BoundingBox, Double)

Determines if two BoundingBoxes overlapping.

Declaration
public static bool AreOverlapping(BoundingBox bBox1, BoundingBox bBox2, double tol)
Parameters
Type Name Description
BoundingBox bBox1

First BoundingBox

BoundingBox bBox2

Second BoundingBox

System.Double tol

Tolerance

Returns
Type Description
System.Boolean

Return true if the BoundingBoxes are overlapping.

| Improve this Doc View Source

Contains(Point3, Boolean)

Tests a point for BoundingBox inclusion.

Declaration
public bool Contains(Point3 pt, bool strict)
Parameters
Type Name Description
Point3 pt

Vector3 to test

System.Boolean strict

If true, the point needs to be fully on the inside of the BoundingBox. I.e. coincident points will be considered 'outside'.

Returns
Type Description
System.Boolean

Return true if the point is contained in the BoundingBox.

| Improve this Doc View Source

GetAxisLength(Int32)

Gets length of given axis.

Declaration
public double GetAxisLength(int i)
Parameters
Type Name Description
System.Int32 i

Index of axis to inspect (between 0 and 2)

Returns
Type Description
System.Double

Return the value length of the axis.

| Improve this Doc View Source

GetLongestAxis()

Gets longest axis of bounding box. Value 0 = X, 1 = Y, 2 = Z.

Declaration
public int GetLongestAxis()
Returns
Type Description
System.Int32

Return the value of the longest axis of BoundingBox.

| Improve this Doc View Source

Intersect(BoundingBox)

Computes the intersection of two bounding boxes. If one of the two boundary is not valid, or the two BoundingBoxes do not intersect return an unset bounding box.

Declaration
public BoundingBox Intersect(BoundingBox other)
Parameters
Type Name Description
BoundingBox other

BoundingBox to intersect with

Returns
Type Description
BoundingBox

Return the BoundingBox intersection between the two BoundingBox.

| Improve this Doc View Source

Intersect(BoundingBox, BoundingBox)

Computes the intersection of two bounding boxes. If one of the two boundary is not valid, or the two BoundingBoxes do not intersect return an unset bounding box.

Declaration
public static BoundingBox Intersect(BoundingBox bBox1, BoundingBox bBox2)
Parameters
Type Name Description
BoundingBox bBox1

First BoundingBox

BoundingBox bBox2

Second BoundingBox

Returns
Type Description
BoundingBox

Return the BoundingBox intersection between the two BoundingBox.

| Improve this Doc View Source

MakeItValid()

Ensures that the box is defined in an increasing fashion. If the ParameterA or ParameterB points are unset, this function will return a BoundingBox unset.

Declaration
public BoundingBox MakeItValid()
Returns
Type Description
BoundingBox

A BoundingBox made valid.

| Improve this Doc View Source

ToString()

Constructs the string representation of this aligned bounding box.

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()
| Improve this Doc View Source

Union(BoundingBox)

Compute the boolean union of this with another BoundingBox

Declaration
public BoundingBox Union(BoundingBox other)
Parameters
Type Name Description
BoundingBox other

BoundingBox to union with

Returns
Type Description
BoundingBox

Return the BoundingBox union between the two BoundingBox

| Improve this Doc View Source

Union(BoundingBox, BoundingBox)

Compute the boolean union between two BoundingBoxes.

Declaration
public static BoundingBox Union(BoundingBox bBox1, BoundingBox bBox2)
Parameters
Type Name Description
BoundingBox bBox1

First BoundingBox

BoundingBox bBox2

Second BoundingBox

Returns
Type Description
BoundingBox

Return the BoundingBox union between the two BoundingBox