Struct GeoAabb3
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
Whether an axis-aligned box touches another shape.
public readonly struct GeoAabb3 : IEquatable<GeoAabb3>
- Implements
- Inherited Members
- Extension Methods
Constructors
- GeoAabb3(GeoPoint3, GeoPoint3)
Initializes a box spanning two opposite corners, in either order.
Properties
- Center
Gets the centre of the box, or the world origin when it is empty.
- Empty
Gets the empty box, which holds nothing.
- IsEmpty
Gets whether the box holds anything at all.
- IsValid
Gets whether this is a shape a constructor could have made: it is empty, or both corners are valid points with the low one no higher than the high one on any axis.
- Max
Gets the corner with the largest coordinate on every axis.
- Min
Gets the corner with the smallest coordinate on every axis.
- SizeX
Gets the size of the box along the X axis, or zero when it is empty.
- SizeY
Gets the size of the box along the Y axis, or zero when it is empty.
- SizeZ
Gets the size of the box along the Z axis, or zero when it is empty.
- SurfaceArea
Gets the total area of the six faces of the box.
- Volume
Gets the volume of the box.
Methods
- Clone()
Creates a copy of this box.
- CollidesWith(GeoAabb3)
Checks whether this box overlaps another one, using the default tolerance.
- CollidesWith(GeoAabb3, Tolerance)
Checks whether this box overlaps another one, within a tolerance.
- CollidesWith(GeoArc3)
Checks whether this axis-aligned box touches an arc, using the default tolerance.
- CollidesWith(GeoArc3, Tolerance)
Checks whether this axis-aligned box touches an arc, within a tolerance.
- CollidesWith(GeoCircle3)
Checks whether this axis-aligned box touches a circle, using the default tolerance.
- CollidesWith(GeoCircle3, Tolerance)
Checks whether this axis-aligned box touches a circle, within a tolerance.
- CollidesWith(GeoEdge3)
Checks whether this axis-aligned box touches an edge.
- CollidesWith(GeoEdge3, Tolerance)
Checks whether this axis-aligned box touches an edge, within a tolerance.
- CollidesWith(GeoLine3)
Checks whether this box touches a segment, using the default tolerance.
- CollidesWith(GeoLine3, Tolerance)
Checks whether this box touches a segment, within a tolerance.
- CollidesWith(GeoObb3)
Checks whether this box touches an oriented box, using the default tolerance.
- CollidesWith(GeoObb3, Tolerance)
Checks whether this box touches an oriented box, within a tolerance.
- CollidesWith(GeoPolygonArc3)
Checks whether this axis-aligned box touches a curved loop.
- CollidesWith(GeoPolygonArc3, Tolerance)
Checks whether this axis-aligned box touches a curved loop, within a tolerance.
- CollidesWith(GeoPolylineArc3)
Checks whether this axis-aligned box touches a curved chain.
- CollidesWith(GeoPolylineArc3, Tolerance)
Checks whether this axis-aligned box touches a curved chain, within a tolerance.
- CollidesWith(GeoRay3)
Checks whether a ray starts inside this box or runs into it, using the default tolerance.
- CollidesWith(GeoRay3, Tolerance)
Checks whether a ray starts inside this box or runs into it, within a tolerance.
- CollidesWith(GeoSolid3)
Checks whether this box touches a solid, using the default tolerance.
- CollidesWith(GeoSolid3, Tolerance)
Checks whether this box touches a solid, within a tolerance.
- Contains(GeoAabb3)
Checks whether this box holds another box entirely, using the default tolerance.
- Contains(GeoAabb3, Tolerance)
Checks whether this box holds another box entirely, within a tolerance.
- Contains(GeoPoint3)
Checks whether this box holds a point, using the default tolerance.
- Contains(GeoPoint3, Tolerance)
Checks whether this box holds a point, within a tolerance.
- DistanceTo(GeoAabb3)
Calculates the shortest distance between this box and another one. Boxes that overlap are at distance zero, and an empty box is infinitely far from everything.
- DistanceTo(GeoPoint3)
Calculates the shortest distance from this box to a point. A point inside is at distance zero, and an empty box is infinitely far from everything.
- DistanceTo(GeoPolyline3)
Gets the distance from this box to a polyline, using the default tolerance.
- DistanceTo(GeoPolyline3, Tolerance)
Gets the distance from this box to a polyline, within a tolerance.
- DistanceTo(GeoSolid3)
Gets the distance from this box to a solid, using the default tolerance.
- DistanceTo(GeoSolid3, Tolerance)
Gets the distance from this box to a solid, within a tolerance.
- Equals(GeoAabb3)
Determines whether another box has exactly the same corners, with two empty boxes counting as equal.
- Equals(object)
Determines whether the specified object is equal to the current box.
- Expand(double)
Gets this box grown outwards by a margin on every side.
- FromPoints(IEnumerable<GeoPoint3>)
Creates the smallest box holding every one of a set of points.
- GetClosestPointOnBoundary(GeoPoint3)
Gets the point of this box closest to a target point. A point inside the box is already on it under that reading and comes back unchanged.
- GetCorners()
Gets the eight corners of the box, or an empty array when it is empty.
- GetHashCode()
Returns the hash code for this instance.
- GetIntersections(GeoArc3)
Gets every point where an arc crosses the surface of this axis-aligned box, using the default tolerance.
- GetIntersections(GeoArc3, Tolerance)
Gets every point where an arc crosses the surface of this axis-aligned box, within a tolerance.
- GetIntersections(GeoCircle3)
Gets every point where a circle crosses the surface of this axis-aligned box, using the default tolerance.
- GetIntersections(GeoCircle3, Tolerance)
Gets every point where a circle crosses the surface of this axis-aligned box, within a tolerance.
- GetIntersections(GeoEdge3)
Gets every point where an edge crosses this axis-aligned box.
- GetIntersections(GeoEdge3, Tolerance)
Gets every point where an edge crosses this axis-aligned box, within a tolerance.
- GetIntersections(GeoLine3)
Gets every point where a segment crosses the surface of this box, using the default tolerance.
- GetIntersections(GeoLine3, Tolerance)
Gets every point where a segment crosses the surface of this box, within a tolerance.
- GetIntersections(GeoPolygonArc3)
Gets every point where a curved loop crosses this axis-aligned box.
- GetIntersections(GeoPolygonArc3, Tolerance)
Gets every point where a curved loop crosses this axis-aligned box, within a tolerance.
- GetIntersections(GeoPolylineArc3)
Gets every point where a curved chain crosses this axis-aligned box.
- GetIntersections(GeoPolylineArc3, Tolerance)
Gets every point where a curved chain crosses this axis-aligned box, within a tolerance.
- GetIntersections(GeoRay3)
Gets every point where a ray crosses the surface of this box, using the default tolerance.
- GetIntersections(GeoRay3, Tolerance)
Gets every point where a ray crosses the surface of this box, within a tolerance.
- Intersect(GeoAabb3)
Gets the box shared by this box and another one, or Empty when they do not overlap.
- IsEqualTo(GeoAabb3)
Compares whether this box equals another using the default tolerance.
- IsEqualTo(GeoAabb3, Tolerance)
Compares whether this box equals another within a tolerance.
- Locate(GeoPoint3)
Locates a point relative to this box, using the default tolerance.
- Locate(GeoPoint3, Tolerance)
Locates a point relative to this box, within a tolerance.
- SignedDistanceTo(GeoPoint3)
Calculates the distance from this box to a point, negative for a point within it.
- SignedDistanceTo(GeoPoint3, Tolerance)
Calculates the distance from this box to a point, negative for a point within it, within a tolerance.
- ToObb()
Gets this box as an oriented box aligned with the world axes.
- ToString()
Returns a string that represents the current box.
- TransformBy(GeoTransform3)
Applies a transformation to this box.
- Translate(GeoVector3)
Moves the box by a vector.
- TryIntersectWith(GeoArc3, out GeoPoint3[])
Tries to find where an arc crosses the surface of this axis-aligned box, using the default tolerance.
- TryIntersectWith(GeoArc3, out GeoPoint3[], Tolerance)
Tries to find where an arc crosses the surface of this axis-aligned box, within a tolerance.
- TryIntersectWith(GeoCircle3, out GeoPoint3[])
Tries to find where a circle crosses the surface of this axis-aligned box, using the default tolerance.
- TryIntersectWith(GeoCircle3, out GeoPoint3[], Tolerance)
Tries to find where a circle crosses the surface of this axis-aligned box, within a tolerance.
- Union(GeoAabb3)
Gets the smallest box holding both this box and another one.
- Union(GeoPoint3)
Gets the smallest box holding both this box and a point.
Operators
- operator ==(GeoAabb3, GeoAabb3)
Checks if two boxes have exactly the same corners.
- operator !=(GeoAabb3, GeoAabb3)
Checks if two boxes differ in either corner.