Table of Contents

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

Min Vector3d
Max Vector3d

Properties

Center

public Vector3d Center { get; }

Property Value

Vector3d

Empty

public static BoundingBox3d Empty { get; }

Property Value

BoundingBox3d

IsEmpty

public bool IsEmpty { get; }

Property Value

bool

Max

public Vector3d Max { get; init; }

Property Value

Vector3d

Min

public Vector3d Min { get; init; }

Property Value

Vector3d

Size

public Vector3d Size { get; }

Property Value

Vector3d

Volume

public double Volume { get; }

Property Value

double

Methods

Contains(Vector3d)

public bool Contains(Vector3d point)

Parameters

point Vector3d

Returns

bool

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

other BoundingBox3d

Returns

BoundingBox3d

Intersects(BoundingBox3d)

public bool Intersects(BoundingBox3d other)

Parameters

other BoundingBox3d

Returns

bool

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

origin Vector3d
invDir Vector3d
maxDistance double
tMin double

Returns

bool

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

other BoundingBox3d

Returns

BoundingBox3d

Union(Vector3d)

public BoundingBox3d Union(Vector3d point)

Parameters

point Vector3d

Returns

BoundingBox3d