20 return min.GetX() <=
max.GetX() &&
min.GetY() <=
max.GetY() &&
31 (i & 2) ?
max.GetY() :
min.GetY(),
32 (i & 4) ?
max.GetZ() :
min.GetZ());
47 min.Add(-amount, -amount, -amount);
48 max.Add(amount, amount, amount);
63 if (v <
min.GetX()) d += (
min.GetX() - v) * (
min.GetX() - v);
64 else if (v >
max.GetX()) d += (v -
max.GetX()) * (v -
max.GetX());
66 if (v <
min.GetY()) d += (
min.GetY() - v) * (
min.GetY() - v);
67 else if (v >
max.GetY()) d += (v -
max.GetY()) * (v -
max.GetY());
69 if (v <
min.GetZ()) d += (
min.GetZ() - v) * (
min.GetZ() - v);
70 else if (v >
max.GetZ()) d += (v -
max.GetZ()) * (v -
max.GetZ());
Vectors, matrices, quaternions, colors, AABBs, and random helpers.
Root namespace for everything the engine exposes.
Vector3D Corner(int i) const
bool Contains(const Vector3D &p) const
True if p lies within (or on the boundary of) the box.
AABB(const Vector3D &mn, const Vector3D &mx)
void Merge(const AABB &o)
Grows this box to also cover o.
bool IsValid() const
True if min is componentwise <= max.
void Expand(float amount)
Pushes min/max outward by amount on every axis.
float DistanceSq(const Vector3D &p) const