Table of Contents

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

Min PclVector3

Corner with the smallest coordinates.

Max PclVector3

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

PclVector3

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

PclBounds

IsEmpty

True when Min exceeds Max on any axis.

public bool IsEmpty { get; }

Property Value

bool

Max

Corner with the largest coordinates.

public PclVector3 Max { get; init; }

Property Value

PclVector3

Min

Corner with the smallest coordinates.

public PclVector3 Min { get; init; }

Property Value

PclVector3

Size

Extent on each axis, clamped to zero.

public PclVector3 Size { get; }

Property Value

PclVector3

Methods

Contains(PclVector3)

True when the box is not empty and contains the point (edges included).

public bool Contains(PclVector3 pt)

Parameters

pt PclVector3

Returns

bool

Encapsulate(PclVector3)

Returns the smallest box that contains this box and the point.

public PclBounds Encapsulate(PclVector3 pt)

Parameters

pt PclVector3

Returns

PclBounds

ToString()

Formats as "[min .. max]", independent of the current culture.

public override string ToString()

Returns

string

Union(PclBounds)

Returns the smallest box that contains both boxes; an empty operand is ignored.

public PclBounds Union(PclBounds other)

Parameters

other PclBounds

Returns

PclBounds