AABBT

Base template for all AABB-types.

Constructors

this
this(vec3 min, vec3 max)

Constructs the AABB.

Members

Aliases

at
alias at = type
Undocumented in source.
vec3
alias vec3 = Vector!(at, 3)
Undocumented in source.

Functions

expand
void expand(AABBT b)

Expands the AABB by another AABB.

expand
void expand(vec3 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.

Properties

area
at area [@property getter]

Returns the area of the AABB.

center
vec3 center [@property getter]

Returns the center of the AABB.

extent
vec3 extent [@property getter]

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

half_extent
vec3 half_extent [@property getter]

Returns the half extent.

vertices
vec3[] vertices [@property getter]

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

Static functions

from_points
AABBT from_points(vec3[] points)

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

Variables

max
vec3 max;

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

min
vec3 min;

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

Parameters

type

all values get stored as this type

Meta