Ejemplo n.º 1
0
 public final Color constrainRGB() {
   // clamp the RGB value to a representable value
   float w = -MathUtils.min(0, r, g, b);
   if (w > 0) {
     r += w;
     g += w;
     b += w;
   }
   return this;
 }
Ejemplo n.º 2
0
 public float getPrimitiveBound(int primID, int i) {
   int quad = 4 * primID;
   int a = 3 * quads[quad + 0];
   int b = 3 * quads[quad + 1];
   int c = 3 * quads[quad + 2];
   int d = 3 * quads[quad + 3];
   int axis = i >>> 1;
   if ((i & 1) == 0)
     return MathUtils.min(points[a + axis], points[b + axis], points[c + axis], points[d + axis]);
   else
     return MathUtils.max(points[a + axis], points[b + axis], points[c + axis], points[d + axis]);
 }
Ejemplo n.º 3
0
 public final float getMin() {
   return MathUtils.min(r, g, b);
 }