Ejemplo n.º 1
0
 /**
  * @param colors A color buffer
  * @param i The index in this buffer where to put the 12 components of this quad
  */
 public void updateColors(float[] colors, int i) {
   float[] baseColor = getColorForOrder(groupIdx, 6);
   System.arraycopy(baseColor, 0, colors, i, 3);
   System.arraycopy(baseColor, 0, colors, i + 3, 3);
   System.arraycopy(baseColor, 0, colors, i + 6, 3);
   System.arraycopy(baseColor, 0, colors, i + 9, 3);
 }
Ejemplo n.º 2
0
 /**
  * @param coords A coordinate buffer
  * @param i The index in this buffer where to put the 12 components of this quad
  */
 public void updateCoords(float[][] grid, float[] coords, int i) {
   System.arraycopy(p.getCoordinates(grid, u, v), 0, coords, i, 3);
   System.arraycopy(p.getCoordinates(grid, u, v + 1), 0, coords, i + 3, 3);
   System.arraycopy(p.getCoordinates(grid, u + 1, v + 1), 0, coords, i + 6, 3);
   System.arraycopy(p.getCoordinates(grid, u + 1, v), 0, coords, i + 9, 3);
 }