AABBT

Base template for all AABB-types.

Constructors

this
this(vec min, vec max)

Constructs the AABB.

Members

Aliases

at
alias at = type
Undocumented in source.
dimension
alias dimension = dimension_
Undocumented in source.
vec
alias vec = Vector!(at, dimension_)
Undocumented in source.

Functions

expand
void expand(AABBT b)

Expands the AABB by another AABB.

expand
void expand(vec v)

Expands the AABB, so that v is part of the AABB.

intersects
bool intersects(AABBT box)

Returns true if the AABBs intersect. This also returns true if one AABB lies inside another.

opEquals
bool opEquals(AABBT other)
Undocumented in source. Be warned that the author may not have intended to support it.
toHash
size_t toHash()

Gets a hash of this item

Properties

area
real area [@property getter]

Returns the area of the AABB.

center
vec center [@property getter]

Returns the center of the AABB.

extent
vec extent [@property getter]

Returns the extent of the AABB (also sometimes called size).

halfExtent
vec halfExtent [@property getter]

Returns the half extent.

vertices
vec[] vertices [@property getter]

Returns all vertices of the AABB, basically one vec per corner.

Static functions

fromPoints
AABBT fromPoints(vec[] points)

Constructs the AABB around N points (all points will be part of the AABB).

Variables

max
vec max;

The maximum of the AABB (e.g. vec(1, 1, 1)).

min
vec min;

The minimum of the AABB (e.g. vec(0, 0, 0)).

Parameters

type

all values get stored as this type

Meta