Box

N-dimensional half-open interval [a, b[.

Constructors

this
this(bound_t min_, bound_t max_)

Construct a box which extends between 2 points. Boundaries: min is inside the box, max is just outside.

this
this(T min_, T max_)
Undocumented in source.
this
this(T min_x, T min_y, T max_x, T max_y)
Undocumented in source.
this
this(T min_x, T min_y, T min_z, T max_x, T max_y, T max_z)
Undocumented in source.

Members

Aliases

bound_t
alias bound_t = Vector!(T, N)
Undocumented in source.

Functions

contains
bool contains(bound_t point)
contains
bool contains(Box other)
distance
double distance(bound_t point)

Euclidean distance from a point.

distance
double distance(Box o)

Euclidean distance from another box.

expand
Box expand(bound_t point)

Expand the box to include point.

grow
Box grow(bound_t space)

Extends the area of this Box.

grow
Box grow(T space)

Extends the area of this Box.

intersection
Box intersection(Box o)

Assumes sorted boxes.

intersects
bool intersects(Box other)

Assumes sorted boxes.

isSorted
bool isSorted()
opAssign
Box opAssign(U x)

Assign with another box.

opEquals
bool opEquals(U other)
shrink
Box shrink(bound_t space)

Shrink the area of this Box. The box might became unsorted.

shrink
Box shrink(T space)

Shrink the area of this Box.

squaredDistance
double squaredDistance(bound_t point)

Euclidean squared distance from a point.

squaredDistance
double squaredDistance(Box o)

Euclidean squared distance from another box.

Properties

center
bound_t center [@property getter]
depth
T depth [@property getter]
height
T height [@property getter]
size
bound_t size [@property getter]
volume
T volume [@property getter]
width
T width [@property getter]

Variables

max
bound_t max;
Undocumented in source.
min
bound_t min;
Undocumented in source.

Meta