Class BoundingBox3D
The BoundingBox3D class represents the axis-aligned area
enclosed by a two points in 3D space.
Inheritance
System.Object
BoundingBox3D
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: DesignData.SDS2.Primitives.dll
Syntax
public sealed class BoundingBox3D
Constructors
BoundingBox3D(BoundingBox3D)
Instantiates a bounding box as a copy of another bounding box.
Declaration
public BoundingBox3D(BoundingBox3D other)
Parameters
BoundingBox3D(Point3D, Point3D)
Instantiates a bounding box that contains both points
Declaration
public BoundingBox3D(Point3D p, Point3D q)
Parameters
Properties
Depth
The difference bewteen the maximum Z and minimum Z
Declaration
public double Depth { get; }
Property Value
Type |
Description |
System.Double |
|
Height
The difference bewteen the maximum Y and minimum Y
Declaration
public double Height { get; }
Property Value
Type |
Description |
System.Double |
|
Max
The maximum X, Y, and Z-coordinate of the bounds
Declaration
public Point3D Max { get; }
Property Value
MaxX
The maximum X-coordinate of the bounds
Declaration
public double MaxX { get; }
Property Value
Type |
Description |
System.Double |
|
MaxY
The maximum Y-coordinate of the bounds
Declaration
public double MaxY { get; }
Property Value
Type |
Description |
System.Double |
|
MaxZ
The maximum Z-coordinate of the bounds
Declaration
public double MaxZ { get; }
Property Value
Type |
Description |
System.Double |
|
Min
The minimum X, Y, and Z-coordinate of the bounds
Declaration
public Point3D Min { get; }
Property Value
MinX
The minimum X-coordinate of the bounds
Declaration
public double MinX { get; }
Property Value
Type |
Description |
System.Double |
|
MinY
The minimum Y-coordinate of the bounds
Declaration
public double MinY { get; }
Property Value
Type |
Description |
System.Double |
|
MinZ
The minimum Z-coordinate of the bounds
Declaration
public double MinZ { get; }
Property Value
Type |
Description |
System.Double |
|
Volume
Declaration
public double Volume { get; }
Property Value
Type |
Description |
System.Double |
|
Width
The difference bewteen the maximum X and minimum X
Declaration
public double Width { get; }
Property Value
Type |
Description |
System.Double |
|
Methods
DoesEnclose(Point3D)
True iff the specified point is within bounds
Declaration
public bool DoesEnclose(Point3D point)
Parameters
Type |
Name |
Description |
Point3D |
point |
|
Returns
Type |
Description |
System.Boolean |
|
DoesOverlap(BoundingBox3D)
True iff the two bounds overlap
Declaration
public bool DoesOverlap(BoundingBox3D other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Equals(Object)
Checks to see if the Min and Max are equal using Double.Equals on each component.
Note that this is an "exact" comparison method, and only
appropriate in special circumstances.
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
The bounds to compare to
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
Expanded(Double)
A new bounding box expanded on all sides by the specified amount
Declaration
public BoundingBox3D Expanded(double amount)
Parameters
Type |
Name |
Description |
System.Double |
amount |
|
Returns
Finalize()
Declaration
protected void Finalize()
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
ShortestVectorToPoint(Point3D)
The shortest vector from the bounds to the specified point
Declaration
public Vector3D ShortestVectorToPoint(Point3D point)
Parameters
Type |
Name |
Description |
Point3D |
point |
|
Returns
ToString()
Formats the point into a string. Note that because the values are
rounded for display, parsing them to retrieve the Min and Max values
will not necessarily yield the same bounds.
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
Unioned(Point3D)
A new bounding box that includes the current bounds and the specified point
Declaration
public BoundingBox3D Unioned(Point3D point)
Parameters
Type |
Name |
Description |
Point3D |
point |
|
Returns
Operators
Equality(BoundingBox3D, BoundingBox3D)
Checks on Min and Max.
Note that this is an "exact" comparison method, and only
appropriate in special circumstances.
Declaration
public static bool operator ==(BoundingBox3D a, BoundingBox3D b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Inequality(BoundingBox3D, BoundingBox3D)
Checks inequality on Min and Max
Note that this is an "exact" comparison method, and only
appropriate in special circumstances.
Declaration
public static bool operator !=(BoundingBox3D a, BoundingBox3D b)
Parameters
Returns
Type |
Description |
System.Boolean |
|