gl3n.aabb
-
Declaration
structAABBT(type);Base template for all AABB-types.
Parameters
typeall values get stored as this type
-
Declaration
aliasat= type;Holds the internal type of the AABB.
-
Declaration
aliasvec3= Vector!(at, 3);Convenience alias to the corresponding vector type.
-
Declaration
vec3min;The minimum of the AABB (e.g. vec3(0, 0, 0)).
-
Declaration
vec3max;The maximum of the AABB (e.g. vec3(1, 1, 1)).
-
Declaration
this(vec3min, vec3max);Constructs the AABB.
Parameters
vec3minminimum of the AABB
vec3maxmaximum of the AABB
-
Declaration
static AABBTfrom_points(vec3[]points);Constructs the AABB around N
points(allpointswill be part of the AABB). -
Declaration
voidexpand(AABBTb);Expands the AABB by another AABB.
-
Declaration
voidexpand(vec3v);Expands the AABB, so that
vis part of the AABB. -
Declaration
const boolintersects(AABBTbox);Returns
trueif the AABBs intersect. This also returnstrueif one AABB lies inside another. -
Declaration
const @property vec3extent();Returns the
extentof the AABB (also sometimes called size). -
Declaration
const @property vec3half_extent();Returns the half extent.
-
Declaration
const @property atarea();Returns the
areaof the AABB. -
Declaration
const @property vec3center();Returns the
centerof the AABB. -
Declaration
const @property vec3[]vertices();Returns all
verticesof the AABB, basically one vec3 per corner.
-