Struct BoundingBox3d
- Namespace
- NwcIO.Model
- Assembly
- NwcIO.dll
An axis-aligned 3D bounding box defined by minimum and maximum extents.
public readonly record struct BoundingBox3d : IEquatable<BoundingBox3d>Implements
Inherited Members
Constructors
BoundingBox3d(Vector3d, Vector3d)
An axis-aligned 3D bounding box defined by minimum and maximum extents.
public BoundingBox3d(Vector3d Min, Vector3d Max)Parameters
Properties
Center
public Vector3d Center { get; }Property Value
Empty
public static BoundingBox3d Empty { get; }Property Value
IsEmpty
public bool IsEmpty { get; }Property Value
Max
public Vector3d Max { get; init; }Property Value
Min
public Vector3d Min { get; init; }Property Value
Size
public Vector3d Size { get; }Property Value
Volume
public double Volume { get; }Property Value
Methods
Contains(Vector3d)
public bool Contains(Vector3d point)Parameters
pointVector3d
Returns
Intersect(BoundingBox3d)
Computes the intersection of this bounding box with another. Returns NwcIO.Model.BoundingBox3d.Empty if the boxes do not intersect.
public BoundingBox3d Intersect(BoundingBox3d other)Parameters
otherBoundingBox3d
Returns
Intersects(BoundingBox3d)
public bool Intersects(BoundingBox3d other)Parameters
otherBoundingBox3d
Returns
IntersectsRay(Vector3d, Vector3d, double, out double)
Tests for ray-AABB intersection using the fast slab method.
public bool IntersectsRay(Vector3d origin, Vector3d invDir, double maxDistance, out double tMin)Parameters
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()Returns
- string
-
The fully qualified type name.
Union(BoundingBox3d)
public BoundingBox3d Union(BoundingBox3d other)Parameters
otherBoundingBox3d
Returns
Union(Vector3d)
public BoundingBox3d Union(Vector3d point)Parameters
pointVector3d