Box

*

Constructors

this
this(BoundType min, BoundType max)

*

this
this(T min, T max)

*

this
this(T min_x, T min_y, T max_x, T max_y)

*

this
this(T min_x, T min_y, T min_z, T max_x, T max_y, T max_z)

*

Members

Aliases

BoundType
alias BoundType = Vector!(T, N)

*

type
alias type = T

*

Functions

contains
bool contains(BoundType point)

* Returns true if it contains point

contains
bool contains(Box other)

*

expand
Box expand(BoundType point)

*

expand
Box expand(Box other)

*

getCenter
BoundType getCenter()

* Returns box center.

getDepth
T getDepth()

* Returns depth of the box.

getDistance
real getDistance(BoundType point)

*

getDistance
real getDistance(Box o)

*

getHeight
T getHeight()

* Returns box height.

getIntersection
Box getIntersection(Box o)

*

getSize
BoundType getSize()

* Returns box dimensions.

getSquaredDistance
real getSquaredDistance(BoundType point)

*

getSquaredDistance
real getSquaredDistance(Box o)

*

getVolume
T getVolume()

* Returns signed volume of the box.

getWidth
T getWidth()

* Returns box width .

grow
Box grow(BoundType space)

*

grow
Box grow(T space)

*

intersects
bool intersects(Box other)

*

isEmpty
bool isEmpty()

* Returns true if empty.

isSorted
bool isSorted()

*

opAssign
Box opAssign(U x)

*

opCast
U opCast()

* Cast to other box types.

opEquals
bool opEquals(U other)

*

shrink
Box shrink(BoundType space)

*

shrink
Box shrink(T space)

*

translate
Box translate(BoundType offset)

*

Manifest constants

dim
enum dim;

*

Static functions

rectangle
Box rectangle(T x, T y, T width, T height)

*

Variables

max
BoundType max;

*

min
BoundType min;

*

Meta