Struct PclBounds
- Namespace
- PclIO
- Assembly
- PclIO.dll
Represents an axis-aligned 3D bounding box.
public readonly record struct PclBounds : IEquatable<PclBounds>Implements
Inherited Members
Constructors
PclBounds(PclVector3, PclVector3)
Represents an axis-aligned 3D bounding box.
public PclBounds(PclVector3 Min, PclVector3 Max)Parameters
MinPclVector3-
Corner with the smallest coordinates.
MaxPclVector3-
Corner with the largest coordinates.
Properties
Center
Midpoint of the box; meaningful only when the box is not empty.
public PclVector3 Center { get; }Property Value
Empty
An empty box (Min is +infinity, Max is -infinity) that is neutral for PclIO.PclBounds.Union(PclIO.PclBounds) and PclIO.PclBounds.Encapsulate(PclIO.PclVector3).
public static PclBounds Empty { get; }Property Value
IsEmpty
True when Min exceeds Max on any axis.
public bool IsEmpty { get; }Property Value
Max
Corner with the largest coordinates.
public PclVector3 Max { get; init; }Property Value
Min
Corner with the smallest coordinates.
public PclVector3 Min { get; init; }Property Value
Size
Extent on each axis, clamped to zero.
public PclVector3 Size { get; }Property Value
Methods
Contains(PclVector3)
True when the box is not empty and contains the point (edges included).
public bool Contains(PclVector3 pt)Parameters
ptPclVector3
Returns
Encapsulate(PclVector3)
Returns the smallest box that contains this box and the point.
public PclBounds Encapsulate(PclVector3 pt)Parameters
ptPclVector3
Returns
ToString()
Formats as "[min .. max]", independent of the current culture.
public override string ToString()Returns
Union(PclBounds)
Returns the smallest box that contains both boxes; an empty operand is ignored.
public PclBounds Union(PclBounds other)Parameters
otherPclBounds