setQuad method

void setQuad (Quad quad)

Set the AABB to enclose a quad.

Implementation

void setQuad(Quad quad) {
  _min.setValues(
      math.min(quad._point0.x,
          math.min(quad._point1.x, math.min(quad._point2.x, quad._point3.x))),
      math.min(quad._point0.y,
          math.min(quad._point1.y, math.min(quad._point2.y, quad._point3.y))),
      math.min(
          quad._point0.z,
          math.min(
              quad._point1.z, math.min(quad._point2.z, quad._point3.z))));
  _max.setValues(
      math.max(quad._point0.x,
          math.max(quad._point1.x, math.max(quad._point2.x, quad._point3.x))),
      math.max(quad._point0.y,
          math.max(quad._point1.y, math.max(quad._point2.y, quad._point3.y))),
      math.max(
          quad._point0.z,
          math.max(
              quad._point1.z, math.max(quad._point2.z, quad._point3.z))));
}