Struct BoundingBox
Axis-aligned bounding box
Assembly: ABB.Robotics.Math.dll
Syntax
public struct BoundingBox
Constructors
View Source
BoundingBox(Vector3, Vector3)
Creates a bounding box from min and max
Declaration
public BoundingBox(Vector3 min, Vector3 max)
Parameters
Fields
View Source
Empty
Empty (invalid) bounding box
Declaration
public static readonly BoundingBox Empty
Field Value
View Source
max
min/max corners of the box.
Declaration
Field Value
View Source
min
min/max corners of the box.
Declaration
Field Value
Properties
View Source
LongestSide
Returns the longest extent of this.
Declaration
public double LongestSide { get; }
Property Value
Methods
View Source
Center()
Returns the center point of this
Declaration
Returns
View Source
Contains(BoundingBox)
Checks if box is contained by this box
Declaration
public bool Contains(BoundingBox box)
Parameters
Returns
View Source
Contains(Vector3)
Checks if a point is inside this box
Declaration
public bool Contains(Vector3 point)
Parameters
| Type |
Name |
Description |
| Vector3 |
point |
|
Returns
View Source
Corners()
Returns the eight corners of this.
Declaration
public Vector3[] Corners()
Returns
View Source
Diameter()
Returns the distance between min and max corners
Declaration
Returns
View Source
Distance(BoundingBox, BoundingBox)
Returns the distance between two bounding boxes.
Declaration
public static double Distance(BoundingBox lhs, BoundingBox rhs)
Parameters
Returns
View Source
Distance(Vector3)
Returns the distance between this BoundingBox and a point.
Declaration
public double Distance(Vector3 point)
Parameters
| Type |
Name |
Description |
| Vector3 |
point |
|
Returns
View Source
Equals(object)
Determines whether this instance and the specified object are equal
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
View Source
Expand(double)
Returns a BoundingBox expanded by an amount in all directions.
Declaration
public BoundingBox Expand(double amount)
Parameters
| Type |
Name |
Description |
| double |
amount |
|
Returns
View Source
GetHashCode()
Returns the hash code for this object.
Declaration
public override int GetHashCode()
Returns
Overrides
View Source
Intersect(BoundingBox)
Returns the interection of this and a second BoundingBox
Declaration
public BoundingBox Intersect(BoundingBox other)
Parameters
Returns
View Source
Intersects(BoundingBox, BoundingBox)
Returns true if two bounding boxes intersect
Declaration
public static bool Intersects(BoundingBox lhs, BoundingBox rhs)
Parameters
Returns
View Source
Intersects(BoundingBox, BoundingBox, double)
Returns true if two bounding boxes intersect.
Declaration
public static bool Intersects(BoundingBox lhs, BoundingBox rhs, double tolerance)
Parameters
Returns
View Source
Intersects(Ray)
Returns true if a ray intersects the bounding box.
Declaration
public bool Intersects(Ray ray)
Parameters
| Type |
Name |
Description |
| Ray |
ray |
|
Returns
View Source
IsValid()
Checks if this is a valid bounding box.
Declaration
Returns
View Source
ToString()
Returns a string representation of this instance
Declaration
public override string ToString()
Returns
Overrides
View Source
Returns a bounding box that is the result of an affine transformation
Declaration
public BoundingBox TransformAffine(Matrix4 matrix)
Parameters
| Type |
Name |
Description |
| Matrix4 |
matrix |
|
Returns
View Source
Volume()
Returns the volume of this
Declaration
Returns
Operators
View Source
operator +(BoundingBox, BoundingBox)
Declaration
public static BoundingBox operator +(BoundingBox lhs, BoundingBox rhs)
Parameters
Returns
| Type |
Description |
| BoundingBox |
A bounding box that contains both operands
|
View Source
operator +(BoundingBox, Vector3)
Declaration
public static BoundingBox operator +(BoundingBox lhs, Vector3 rhs)
Parameters
Returns
| Type |
Description |
| BoundingBox |
A bounding box that contains both operands
|
View Source
operator ==(BoundingBox, BoundingBox)
Declaration
public static bool operator ==(BoundingBox lhs, BoundingBox rhs)
Parameters
Returns
View Source
operator !=(BoundingBox, BoundingBox)
Declaration
public static bool operator !=(BoundingBox lhs, BoundingBox rhs)
Parameters
Returns