Header menu logo Nu

Box3i Type

Defines an axis-aligned 3D box (cube). Copied from - https://github.com/opentk/opentk/blob/opentk5.0/src/OpenTK.Mathematics/Geometry/Box3.cs Heavily modified by BGE to more closely conform to System.Numerics and use a size-preserving representation ([min, size] instead of [min, max]).

Constructors

Constructor Description

Box3i(min, size)

Full Usage: Box3i(min, size)

Parameters:

Initializes a new instance of the Box3i struct.

min : Vector3i
size : Vector3i

Box3i(minX, minY, minZ, sizeX, sizeY, sizeZ)

Full Usage: Box3i(minX, minY, minZ, sizeX, sizeY, sizeZ)

Parameters:
    minX : int
    minY : int
    minZ : int
    sizeX : int
    sizeY : int
    sizeZ : int

Initializes a new instance of the Box3i struct.

minX : int
minY : int
minZ : int
sizeX : int
sizeY : int
sizeZ : int

Instance members

Instance member Description

this.Combine

Full Usage: this.Combine

Parameters:
Returns: Box3i Box containing area of both.

Combine area of box with a point.

point : Vector3i
Returns: Box3i

Box containing area of both.

this.Combine

Full Usage: this.Combine

Parameters:
Returns: Box3i Box containing area of both.

Combine area of two boxes.

box : Box3i

Returns: Box3i

Box containing area of both.

this.Contains

Full Usage: this.Contains

Parameters:
Returns: ContainmentType A value indicating if this Box3i contains, intersects with or is disjoint with box.

Check if this Box3i contains another Box3i.

box : Box3i

The Box3i to test for overlap.

Returns: ContainmentType

A value indicating if this Box3i contains, intersects with or is disjoint with box.

this.Contains

Full Usage: this.Contains

Parameters:
    box : byref<Box3i> - The Box3i to test for overlap.
    result : byref<ContainmentType> - A value indicating if this Box3i contains, intersects with or is disjoint with box.

Check if this Box3i contains another Box3i.

box : byref<Box3i>

The Box3i to test for overlap.

result : byref<ContainmentType>

A value indicating if this Box3i contains, intersects with or is disjoint with box.

this.Contains

Full Usage: this.Contains

Parameters:
Returns: ContainmentType ContainmentType.Contains if this Box3i contains point or ContainmentType.Disjoint if it does not.

Check if this Box3i contains a point.

point : Vector3i

The Vector3i to test.

Returns: ContainmentType

ContainmentType.Contains if this Box3i contains point or ContainmentType.Disjoint if it does not.

this.Contains

Full Usage: this.Contains

Parameters:

Check if this Box3i contains a point.

point : byref<Vector3i>

The Vector3i to test.

result : byref<ContainmentType>

ContainmentType.Contains if this Box3i contains point or ContainmentType.Disjoint if it does not.

this.ContainsExclusive

Full Usage: this.ContainsExclusive

Parameters:
Returns: ContainmentType A value indicating if this Box3i contains, intersects with or is disjoint with box.

Check if this Box3i contains another Box3i AND no box outside of this box intersects with it.

box : Box3i

The Box3i to test for overlap.

Returns: ContainmentType

A value indicating if this Box3i contains, intersects with or is disjoint with box.

this.ContainsExclusive

Full Usage: this.ContainsExclusive

Parameters:
    box : byref<Box3i> - The Box3i to test for overlap.
    result : byref<ContainmentType> - A value indicating if this Box3i contains, intersects with or is disjoint with box.

Check if this Box3i contains another Box3i AND no box outside of this box intersects with it.

box : byref<Box3i>

The Box3i to test for overlap.

result : byref<ContainmentType>

A value indicating if this Box3i contains, intersects with or is disjoint with box.

this.Corners

Full Usage: this.Corners

Returns: Vector3i[] An array of Vector3i containing the corners of this Box3i.

Get an array of Vector3i containing the corners of this Box3i.

Returns: Vector3i[]

An array of Vector3i containing the corners of this Box3i.

this.Equals

Full Usage: this.Equals

Parameters:
    obj : obj

Returns: bool
Modifiers: abstract
obj : obj
Returns: bool

this.Equals

Full Usage: this.Equals

Parameters:
Returns: bool
Modifiers: abstract
other : Box3i
Returns: bool

this.GetHashCode

Full Usage: this.GetHashCode

Returns: int
Modifiers: abstract
Returns: int

this.Intersects

Full Usage: this.Intersects

Parameters:
Returns: bool
true
if this Box3i intersects point,
false
if it does not.

Check if this Box3i is intersected by a Vector3i.

point : Vector3i

The Vector3i to test for intersection.

Returns: bool

true
if this Box3i intersects point,
false
if it does not.

this.Intersects

Full Usage: this.Intersects

Parameters:
    point : inref<Vector3i> - The Vector3i to test for intersection.
    result : byref<bool> -
    true
    
    if this Box3i intersects point,
    false
    
    if it does not.


Check if this Box3i is intersected by a Vector3i.

point : inref<Vector3i>

The Vector3i to test for intersection.

result : byref<bool>

true
if this Box3i intersects point,
false
if it does not.

this.Intersects

Full Usage: this.Intersects

Parameters:
    box : Box3i - The Box3i to test for intersection.

Returns: bool
true
if this Box3i intersects box,
false
if it does not.

Check if this Box3i intersects another Box3i.

box : Box3i

The Box3i to test for intersection.

Returns: bool

true
if this Box3i intersects box,
false
if it does not.

this.Intersects

Full Usage: this.Intersects

Parameters:
    box : inref<Box3i> - The Box3i to test for intersection.
    result : byref<bool> -
    true
    
    if this Box3i intersects box,
    false
    
    if it does not.


Check if this Box3i intersects another Box3i.

box : inref<Box3i>

The Box3i to test for intersection.

result : byref<bool>

true
if this Box3i intersects box,
false
if it does not.

this.Mirror

Full Usage: this.Mirror

Returns: Box3i

The mirror image of a box.

Returns: Box3i

this.ToString

Full Usage: this.ToString

Returns: string
Modifiers: abstract
Returns: string

Static members

Static member Description

left <> right

Full Usage: left <> right

Parameters:
    left : Box3i - The left operand.
    right : Box3i - The right operand.

Returns: bool

Inequality comparator.

left : Box3i

The left operand.

right : Box3i

The right operand.

Returns: bool

left = right

Full Usage: left = right

Parameters:
    left : Box3i - The left operand.
    right : Box3i - The right operand.

Returns: bool

Equality comparator.

left : Box3i

The left operand.

right : Box3i

The right operand.

Returns: bool

Box3i.Enclose(point, point2)

Full Usage: Box3i.Enclose(point, point2)

Parameters:
Returns: Box3i

Create a bounding box by enclosing two points.

point : Vector3i
point2 : Vector3i
Returns: Box3i

Box3i.Enclose(points)

Full Usage: Box3i.Enclose(points)

Parameters:
Returns: Box3i

Create a bounding box by enclosing multiple points.

points : Vector3i[]
Returns: Box3i

Type something to start searching.