9#ifndef AVARA3D_MESH_AABB_H
10#define AVARA3D_MESH_AABB_H
Axis-aligned bounding box defined by minimum and maximum corners.
static void Expand(AABB &a, const math::vec3 &p)
Expands a to contain p, initializing invalid bounds to p.
static AABB Invalid()
Returns an invalid box suitable as an empty accumulation seed.
bool valid() const
Returns whether min is no greater than max on every axis.
static math::vec3 Center(const AABB &a)
Returns the midpoint between a.min and a.max.
AABB & operator|=(const AABB &b)
Expands this box to include b.
static AABB Union(const AABB &a, const AABB &b)
Returns the union of a and b, treating invalid bounds as empty.
math::vec3 max
Maximum corner.
static AABB Zero()
Returns a zero-size box at the origin.
AABB & operator|=(const math::vec3 &p)
Expands this box to include p.
math::vec3 min
Minimum corner.