commit b948df7a07b4483ede9bc42fd9c79b20de3d1ee0
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Fri Aug 28 01:37:57 2020 +0100

    Rename Meshes.

diff --git a/src/main/java/org/distorted/library/mesh/MeshRectangles.java b/src/main/java/org/distorted/library/mesh/MeshRectangles.java
deleted file mode 100644
index 80ef94b..0000000
--- a/src/main/java/org/distorted/library/mesh/MeshRectangles.java
+++ /dev/null
@@ -1,248 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// Copyright 2016 Leszek Koltunski                                                               //
-//                                                                                               //
-// This file is part of Distorted.                                                               //
-//                                                                                               //
-// Distorted is free software: you can redistribute it and/or modify                             //
-// it under the terms of the GNU General Public License as published by                          //
-// the Free Software Foundation, either version 2 of the License, or                             //
-// (at your option) any later version.                                                           //
-//                                                                                               //
-// Distorted is distributed in the hope that it will be useful,                                  //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
-// GNU General Public License for more details.                                                  //
-//                                                                                               //
-// You should have received a copy of the GNU General Public License                             //
-// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-package org.distorted.library.mesh;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Create a flat, rectangular grid.
- * <p>
- * Perfect if you just want to display a flat Texture. If you are not planning to apply any VERTEX
- * effects to it, use MeshRectangles(1,1), i.e. a Quad. Otherwise, create more vertices for more realistic effects!
- */
-public class MeshRectangles extends MeshBase
-  {
-  private int mCols, mRows;
-  private int remainingVert;
-  private int numVertices;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// Create a flat, full grid.
-
-  private void computeNumberOfVertices(int cols, int rows)
-     {
-     mRows=rows;
-     mCols=cols;
-
-     if( cols==1 && rows==1 )
-       {
-       numVertices = 4;
-       }
-     else
-       {
-       numVertices = 2*( mRows*mCols +2*mRows - 1) +2*(mCols>=2 ? mRows:0) +
-                     (mCols>=2 && mRows>=2 ? 2*mRows-2 : 1);
-       }
-
-     remainingVert = numVertices;
-     }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private int addVertex(int vertex, float x, float y, float[] attribs1, float[] attribs2)
-     {
-     remainingVert--;
-
-     attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB  ] =    x;
-     attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB+1] =   -y;
-     attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB+2] = 0.0f;
-
-     attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB  ] = 0.0f;
-     attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB+1] = 0.0f;
-     attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB+2] = 1.0f;
-
-     attribs2[VERT2_ATTRIBS*vertex + TEX_ATTRIB  ] = x+0.5f;
-     attribs2[VERT2_ATTRIBS*vertex + TEX_ATTRIB+1] = 0.5f-y;
-
-     return vertex+1;
-     }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private int repeatLast(int vertex, float[] attribs1, float[] attribs2)
-     {
-     if( vertex>0 )
-       {
-       remainingVert--;
-
-       attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB  ] = attribs1[VERT1_ATTRIBS*(vertex-1) + POS_ATTRIB  ];
-       attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB+1] = attribs1[VERT1_ATTRIBS*(vertex-1) + POS_ATTRIB+1];
-       attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB+2] = attribs1[VERT1_ATTRIBS*(vertex-1) + POS_ATTRIB+2];
-
-       attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB  ] = attribs1[VERT1_ATTRIBS*(vertex-1) + NOR_ATTRIB  ];
-       attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB+1] = attribs1[VERT1_ATTRIBS*(vertex-1) + NOR_ATTRIB+1];
-       attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB+2] = attribs1[VERT1_ATTRIBS*(vertex-1) + NOR_ATTRIB+2];
-
-       attribs2[VERT2_ATTRIBS*vertex + TEX_ATTRIB  ] = attribs2[VERT2_ATTRIBS*(vertex-1) + TEX_ATTRIB  ];
-       attribs2[VERT2_ATTRIBS*vertex + TEX_ATTRIB+1] = attribs2[VERT2_ATTRIBS*(vertex-1) + TEX_ATTRIB+1];
-
-       vertex++;
-       }
-
-     return vertex;
-     }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void buildGrid(float[] attribs1, float[] attribs2)
-     {
-     boolean currBlockIsNE, lastBlockIsNE = false;
-     int vertex = 0;
-     float x,y;
-     final float dx = 1.0f/mCols;
-     final float dy = 1.0f/mRows;
-
-     y =-0.5f;
-
-     for(int row=0; row<mRows; row++)
-       {
-       x =-0.5f;
-
-       for(int col=0; col<mCols; col++)
-         {
-         currBlockIsNE = (2*row<=mRows-1)^(2*col<=mCols-1);
-
-         if( col==0 || (lastBlockIsNE^currBlockIsNE) )
-           {
-           if( row!=0 && col==0 ) vertex = repeatLast(vertex,attribs1,attribs2);
-           vertex= addVertex( vertex, x, y+(currBlockIsNE?0:dy), attribs1,attribs2);
-           if( row!=0 && col==0 ) vertex = repeatLast(vertex,attribs1,attribs2);
-           if( lastBlockIsNE^currBlockIsNE)  vertex = repeatLast(vertex,attribs1,attribs2);
-           vertex= addVertex( vertex, x, y+(currBlockIsNE?dy:0), attribs1,attribs2);
-           }
-         vertex= addVertex( vertex, x+dx, y+(currBlockIsNE?0:dy), attribs1,attribs2);
-         vertex= addVertex( vertex, x+dx, y+(currBlockIsNE?dy:0), attribs1,attribs2);
-
-         lastBlockIsNE = currBlockIsNE;
-         x+=dx;
-         }
-
-       y+=dy;
-       }
-     }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void buildGrid(float[] attribs1, float[] attribs2, float[] xLoc, float[] yLoc)
-     {
-     boolean currBlockIsNE,lastBlockIsNE = false;
-     int vertex = 0;
-     float dx,dy,x,y= yLoc[0];
-
-     for(int row=0; row<mRows; row++)
-       {
-       x = xLoc[0];
-       dy= yLoc[row+1];
-
-       for(int col=0; col<mCols; col++)
-         {
-         dx = xLoc[col+1];
-         currBlockIsNE = (2*row<=mRows-1)^(2*col<=mCols-1);
-
-         if( col==0 || (lastBlockIsNE^currBlockIsNE) )
-           {
-           if( row!=0 && col==0 ) vertex = repeatLast(vertex,attribs1,attribs2);
-           vertex= addVertex( vertex, x, y+(currBlockIsNE?0:dy), attribs1,attribs2);
-           if( row!=0 && col==0 ) vertex = repeatLast(vertex,attribs1,attribs2);
-           if( lastBlockIsNE^currBlockIsNE)  vertex = repeatLast(vertex,attribs1,attribs2);
-           vertex= addVertex( vertex, x, y+(currBlockIsNE?dy:0), attribs1,attribs2);
-           }
-         vertex= addVertex( vertex, x+dx, y+(currBlockIsNE?0:dy), attribs1,attribs2);
-         vertex= addVertex( vertex, x+dx, y+(currBlockIsNE?dy:0), attribs1,attribs2);
-
-         lastBlockIsNE = currBlockIsNE;
-         x+=dx;
-         }
-
-       y+=dy;
-       }
-     }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// PUBLIC API
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Creates a rectangular grid of vertices, normals and texture coords.
- *
- * @param cols Number of columns in the grid.
- * @param rows Number of rows in the grid.
- */
-  public MeshRectangles(int cols, int rows)
-    {
-    super();
-    computeNumberOfVertices(cols,rows);
-
-    float[] attribs1= new float[VERT1_ATTRIBS*numVertices];
-    float[] attribs2= new float[VERT2_ATTRIBS*numVertices];
-
-    buildGrid(attribs1,attribs2);
-
-    if( remainingVert!=0 )
-      android.util.Log.d("MeshRectangles", "remainingVert " +remainingVert );
-
-    setAttribs(attribs1,attribs2);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Creates a rectangular grid of vertices, normals and texture coords.
- *
- * @param xLoc list of x-coordinates of vertices. First value: distance of the left edge from 0.
- *             Next values: distance of the next column from the previous. Must be NonNull!
- * @param yLoc list of y-coordinates of vertices. First value: distance of the bottom edge from 0.
- *             Next values: distance of the next row from the previous. Must be NonNull!
- */
-  public MeshRectangles(float[] xLoc, float[] yLoc)
-    {
-    super();
-    computeNumberOfVertices(xLoc.length-1,yLoc.length-1);
-
-    float[] attribs1= new float[VERT1_ATTRIBS*numVertices];
-    float[] attribs2= new float[VERT2_ATTRIBS*numVertices];
-
-    buildGrid(attribs1,attribs2,xLoc,yLoc);
-
-    if( remainingVert!=0 )
-      android.util.Log.d("MeshRectangles", "remainingVert " +remainingVert );
-
-    setAttribs(attribs1,attribs2);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Copy constructor.
- */
-  public MeshRectangles(MeshRectangles mesh, boolean deep)
-    {
-    super(mesh,deep);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Copy the Mesh.
- *
- * @param deep If to be a deep or shallow copy of mVertAttribs1, i.e. the array holding vertices,
- *             normals and inflates (the rest, in particular the mVertAttribs2 containing texture
- *             coordinates and effect associations, is always deep copied)
- */
-  public MeshRectangles copy(boolean deep)
-    {
-    return new MeshRectangles(this,deep);
-    }
- }
\ No newline at end of file
diff --git a/src/main/java/org/distorted/library/mesh/MeshSquare.java b/src/main/java/org/distorted/library/mesh/MeshSquare.java
new file mode 100644
index 0000000..cc0bba6
--- /dev/null
+++ b/src/main/java/org/distorted/library/mesh/MeshSquare.java
@@ -0,0 +1,248 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+package org.distorted.library.mesh;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Create a flat, rectangular grid.
+ * <p>
+ * Perfect if you just want to display a flat Texture. If you are not planning to apply any VERTEX
+ * effects to it, use MeshRectangles(1,1), i.e. a Quad. Otherwise, create more vertices for more realistic effects!
+ */
+public class MeshSquare extends MeshBase
+  {
+  private int mCols, mRows;
+  private int remainingVert;
+  private int numVertices;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Create a flat, full grid.
+
+  private void computeNumberOfVertices(int cols, int rows)
+     {
+     mRows=rows;
+     mCols=cols;
+
+     if( cols==1 && rows==1 )
+       {
+       numVertices = 4;
+       }
+     else
+       {
+       numVertices = 2*( mRows*mCols +2*mRows - 1) +2*(mCols>=2 ? mRows:0) +
+                     (mCols>=2 && mRows>=2 ? 2*mRows-2 : 1);
+       }
+
+     remainingVert = numVertices;
+     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private int addVertex(int vertex, float x, float y, float[] attribs1, float[] attribs2)
+     {
+     remainingVert--;
+
+     attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB  ] =    x;
+     attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB+1] =   -y;
+     attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB+2] = 0.0f;
+
+     attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB  ] = 0.0f;
+     attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB+1] = 0.0f;
+     attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB+2] = 1.0f;
+
+     attribs2[VERT2_ATTRIBS*vertex + TEX_ATTRIB  ] = x+0.5f;
+     attribs2[VERT2_ATTRIBS*vertex + TEX_ATTRIB+1] = 0.5f-y;
+
+     return vertex+1;
+     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private int repeatLast(int vertex, float[] attribs1, float[] attribs2)
+     {
+     if( vertex>0 )
+       {
+       remainingVert--;
+
+       attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB  ] = attribs1[VERT1_ATTRIBS*(vertex-1) + POS_ATTRIB  ];
+       attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB+1] = attribs1[VERT1_ATTRIBS*(vertex-1) + POS_ATTRIB+1];
+       attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB+2] = attribs1[VERT1_ATTRIBS*(vertex-1) + POS_ATTRIB+2];
+
+       attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB  ] = attribs1[VERT1_ATTRIBS*(vertex-1) + NOR_ATTRIB  ];
+       attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB+1] = attribs1[VERT1_ATTRIBS*(vertex-1) + NOR_ATTRIB+1];
+       attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB+2] = attribs1[VERT1_ATTRIBS*(vertex-1) + NOR_ATTRIB+2];
+
+       attribs2[VERT2_ATTRIBS*vertex + TEX_ATTRIB  ] = attribs2[VERT2_ATTRIBS*(vertex-1) + TEX_ATTRIB  ];
+       attribs2[VERT2_ATTRIBS*vertex + TEX_ATTRIB+1] = attribs2[VERT2_ATTRIBS*(vertex-1) + TEX_ATTRIB+1];
+
+       vertex++;
+       }
+
+     return vertex;
+     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private void buildGrid(float[] attribs1, float[] attribs2)
+     {
+     boolean currBlockIsNE, lastBlockIsNE = false;
+     int vertex = 0;
+     float x,y;
+     final float dx = 1.0f/mCols;
+     final float dy = 1.0f/mRows;
+
+     y =-0.5f;
+
+     for(int row=0; row<mRows; row++)
+       {
+       x =-0.5f;
+
+       for(int col=0; col<mCols; col++)
+         {
+         currBlockIsNE = (2*row<=mRows-1)^(2*col<=mCols-1);
+
+         if( col==0 || (lastBlockIsNE^currBlockIsNE) )
+           {
+           if( row!=0 && col==0 ) vertex = repeatLast(vertex,attribs1,attribs2);
+           vertex= addVertex( vertex, x, y+(currBlockIsNE?0:dy), attribs1,attribs2);
+           if( row!=0 && col==0 ) vertex = repeatLast(vertex,attribs1,attribs2);
+           if( lastBlockIsNE^currBlockIsNE)  vertex = repeatLast(vertex,attribs1,attribs2);
+           vertex= addVertex( vertex, x, y+(currBlockIsNE?dy:0), attribs1,attribs2);
+           }
+         vertex= addVertex( vertex, x+dx, y+(currBlockIsNE?0:dy), attribs1,attribs2);
+         vertex= addVertex( vertex, x+dx, y+(currBlockIsNE?dy:0), attribs1,attribs2);
+
+         lastBlockIsNE = currBlockIsNE;
+         x+=dx;
+         }
+
+       y+=dy;
+       }
+     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private void buildGrid(float[] attribs1, float[] attribs2, float[] xLoc, float[] yLoc)
+     {
+     boolean currBlockIsNE,lastBlockIsNE = false;
+     int vertex = 0;
+     float dx,dy,x,y= yLoc[0];
+
+     for(int row=0; row<mRows; row++)
+       {
+       x = xLoc[0];
+       dy= yLoc[row+1];
+
+       for(int col=0; col<mCols; col++)
+         {
+         dx = xLoc[col+1];
+         currBlockIsNE = (2*row<=mRows-1)^(2*col<=mCols-1);
+
+         if( col==0 || (lastBlockIsNE^currBlockIsNE) )
+           {
+           if( row!=0 && col==0 ) vertex = repeatLast(vertex,attribs1,attribs2);
+           vertex= addVertex( vertex, x, y+(currBlockIsNE?0:dy), attribs1,attribs2);
+           if( row!=0 && col==0 ) vertex = repeatLast(vertex,attribs1,attribs2);
+           if( lastBlockIsNE^currBlockIsNE)  vertex = repeatLast(vertex,attribs1,attribs2);
+           vertex= addVertex( vertex, x, y+(currBlockIsNE?dy:0), attribs1,attribs2);
+           }
+         vertex= addVertex( vertex, x+dx, y+(currBlockIsNE?0:dy), attribs1,attribs2);
+         vertex= addVertex( vertex, x+dx, y+(currBlockIsNE?dy:0), attribs1,attribs2);
+
+         lastBlockIsNE = currBlockIsNE;
+         x+=dx;
+         }
+
+       y+=dy;
+       }
+     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Creates a rectangular grid of vertices, normals and texture coords.
+ *
+ * @param cols Number of columns in the grid.
+ * @param rows Number of rows in the grid.
+ */
+  public MeshSquare(int cols, int rows)
+    {
+    super();
+    computeNumberOfVertices(cols,rows);
+
+    float[] attribs1= new float[VERT1_ATTRIBS*numVertices];
+    float[] attribs2= new float[VERT2_ATTRIBS*numVertices];
+
+    buildGrid(attribs1,attribs2);
+
+    if( remainingVert!=0 )
+      android.util.Log.d("MeshRectangles", "remainingVert " +remainingVert );
+
+    setAttribs(attribs1,attribs2);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Creates a rectangular grid of vertices, normals and texture coords.
+ *
+ * @param xLoc list of x-coordinates of vertices. First value: distance of the left edge from 0.
+ *             Next values: distance of the next column from the previous. Must be NonNull!
+ * @param yLoc list of y-coordinates of vertices. First value: distance of the bottom edge from 0.
+ *             Next values: distance of the next row from the previous. Must be NonNull!
+ */
+  public MeshSquare(float[] xLoc, float[] yLoc)
+    {
+    super();
+    computeNumberOfVertices(xLoc.length-1,yLoc.length-1);
+
+    float[] attribs1= new float[VERT1_ATTRIBS*numVertices];
+    float[] attribs2= new float[VERT2_ATTRIBS*numVertices];
+
+    buildGrid(attribs1,attribs2,xLoc,yLoc);
+
+    if( remainingVert!=0 )
+      android.util.Log.d("MeshRectangles", "remainingVert " +remainingVert );
+
+    setAttribs(attribs1,attribs2);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Copy constructor.
+ */
+  public MeshSquare(MeshSquare mesh, boolean deep)
+    {
+    super(mesh,deep);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Copy the Mesh.
+ *
+ * @param deep If to be a deep or shallow copy of mVertAttribs1, i.e. the array holding vertices,
+ *             normals and inflates (the rest, in particular the mVertAttribs2 containing texture
+ *             coordinates and effect associations, is always deep copied)
+ */
+  public MeshSquare copy(boolean deep)
+    {
+    return new MeshSquare(this,deep);
+    }
+ }
\ No newline at end of file
diff --git a/src/main/java/org/distorted/library/mesh/MeshTriangle.java b/src/main/java/org/distorted/library/mesh/MeshTriangle.java
new file mode 100644
index 0000000..eb0407a
--- /dev/null
+++ b/src/main/java/org/distorted/library/mesh/MeshTriangle.java
@@ -0,0 +1,142 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2020 Leszek Koltunski                                                               //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// Distorted is free software: you can redistribute it and/or modify                             //
+// it under the terms of the GNU General Public License as published by                          //
+// the Free Software Foundation, either version 2 of the License, or                             //
+// (at your option) any later version.                                                           //
+//                                                                                               //
+// Distorted is distributed in the hope that it will be useful,                                  //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
+// GNU General Public License for more details.                                                  //
+//                                                                                               //
+// You should have received a copy of the GNU General Public License                             //
+// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+package org.distorted.library.mesh;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Create a Mesh which approximates an equilateral triangle.
+ */
+public class MeshTriangle extends MeshBase
+  {
+  private int numVertices;
+  private int remainingVert;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private int addVertex(int vertex, float x, float y, float[] attribs1, float[] attribs2)
+     {
+     remainingVert--;
+
+     attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB  ] = x-0.5f;
+     attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB+1] = y-0.5f;
+     attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB+2] = 0.0f;
+
+     attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB  ] = 0.0f;
+     attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB+1] = 0.0f;
+     attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB+2] = 1.0f;
+
+     attribs2[VERT2_ATTRIBS*vertex + TEX_ATTRIB  ] = x;
+     attribs2[VERT2_ATTRIBS*vertex + TEX_ATTRIB+1] = y;
+
+     return vertex+1;
+     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private void computeNumberOfVertices(int level)
+     {
+     numVertices = level*(level+2);
+     remainingVert = numVertices;
+     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private int buildRow(int vertex,float sx, float sy, int length, float dx, float dy, float[] attribs1, float[] attribs2)
+    {
+    for(int i=0; i<length; i++)
+      {
+      vertex = addVertex(vertex, sx   , sy   , attribs1, attribs2);
+      vertex = addVertex(vertex, sx+dx, sy+dy, attribs1, attribs2);
+      sx += 2*dx;
+      }
+
+    vertex = addVertex(vertex, sx, sy, attribs1, attribs2);
+
+    return vertex;
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  private void buildGrid(float[] attribs1, float[] attribs2, int level)
+     {
+     float sx = 0.0f;
+     float sy = 0.0f;
+     float dx = 0.5f/level;
+     float dy = 1.0f/level;
+     int vertex = 0;
+
+     for(int row=level; row>=1; row--)
+       {
+       vertex = buildRow(vertex,sx,sy,row,dx,dy,attribs1,attribs2);
+
+       sx += 2*dx*(row-0.5f);
+       sy += dy;
+       dx *= -1;
+       }
+     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// PUBLIC API
+///////////////////////////////////////////////////////////////////////////////////////////////////
+  /**
+   * Creates the underlying grid of vertices with the usual attribs which approximates an equilateral
+   * triangle.
+   *
+   * @param level Specifies the level of slicing. Valid values: level &ge; 1
+   */
+  public MeshTriangle(int level)
+     {
+     super();
+
+     computeNumberOfVertices(level);
+
+     float[] attribs1= new float[VERT1_ATTRIBS*numVertices];
+     float[] attribs2= new float[VERT2_ATTRIBS*numVertices];
+
+     buildGrid(attribs1, attribs2, level);
+
+     if( remainingVert!=0 )
+       android.util.Log.d("MeshTriangles", "remainingVert " +remainingVert );
+
+     setAttribs(attribs1, attribs2);
+     }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Copy constructor.
+ */
+  public MeshTriangle(MeshTriangle mesh, boolean deep)
+    {
+    super(mesh,deep);
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Copy the Mesh.
+ *
+ * @param deep If to be a deep or shallow copy of mVertAttribs1, i.e. the array holding vertices,
+ *             normals and inflates (the rest, in particular the mVertAttribs2 containing texture
+ *             coordinates and effect associations, is always deep copied)
+ */
+  public MeshTriangle copy(boolean deep)
+    {
+    return new MeshTriangle(this,deep);
+    }
+  }
diff --git a/src/main/java/org/distorted/library/mesh/MeshTriangles.java b/src/main/java/org/distorted/library/mesh/MeshTriangles.java
deleted file mode 100644
index 1df4892..0000000
--- a/src/main/java/org/distorted/library/mesh/MeshTriangles.java
+++ /dev/null
@@ -1,142 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// Copyright 2020 Leszek Koltunski                                                               //
-//                                                                                               //
-// This file is part of Distorted.                                                               //
-//                                                                                               //
-// Distorted is free software: you can redistribute it and/or modify                             //
-// it under the terms of the GNU General Public License as published by                          //
-// the Free Software Foundation, either version 2 of the License, or                             //
-// (at your option) any later version.                                                           //
-//                                                                                               //
-// Distorted is distributed in the hope that it will be useful,                                  //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
-// GNU General Public License for more details.                                                  //
-//                                                                                               //
-// You should have received a copy of the GNU General Public License                             //
-// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-package org.distorted.library.mesh;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Create a Mesh which approximates an equilateral triangle.
- */
-public class MeshTriangles extends MeshBase
-  {
-  private int numVertices;
-  private int remainingVert;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private int addVertex(int vertex, float x, float y, float[] attribs1, float[] attribs2)
-     {
-     remainingVert--;
-
-     attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB  ] = x-0.5f;
-     attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB+1] = y-0.5f;
-     attribs1[VERT1_ATTRIBS*vertex + POS_ATTRIB+2] = 0.0f;
-
-     attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB  ] = 0.0f;
-     attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB+1] = 0.0f;
-     attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB+2] = 1.0f;
-
-     attribs2[VERT2_ATTRIBS*vertex + TEX_ATTRIB  ] = x;
-     attribs2[VERT2_ATTRIBS*vertex + TEX_ATTRIB+1] = y;
-
-     return vertex+1;
-     }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void computeNumberOfVertices(int level)
-     {
-     numVertices = level*(level+2);
-     remainingVert = numVertices;
-     }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private int buildRow(int vertex,float sx, float sy, int length, float dx, float dy, float[] attribs1, float[] attribs2)
-    {
-    for(int i=0; i<length; i++)
-      {
-      vertex = addVertex(vertex, sx   , sy   , attribs1, attribs2);
-      vertex = addVertex(vertex, sx+dx, sy+dy, attribs1, attribs2);
-      sx += 2*dx;
-      }
-
-    vertex = addVertex(vertex, sx, sy, attribs1, attribs2);
-
-    return vertex;
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private void buildGrid(float[] attribs1, float[] attribs2, int level)
-     {
-     float sx = 0.0f;
-     float sy = 0.0f;
-     float dx = 0.5f/level;
-     float dy = 1.0f/level;
-     int vertex = 0;
-
-     for(int row=level; row>=1; row--)
-       {
-       vertex = buildRow(vertex,sx,sy,row,dx,dy,attribs1,attribs2);
-
-       sx += 2*dx*(row-0.5f);
-       sy += dy;
-       dx *= -1;
-       }
-     }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// PUBLIC API
-///////////////////////////////////////////////////////////////////////////////////////////////////
-  /**
-   * Creates the underlying grid of vertices with the usual attribs which approximates an equilateral
-   * triangle.
-   *
-   * @param level Specifies the level of slicing. Valid values: level &ge; 1
-   */
-  public MeshTriangles(int level)
-     {
-     super();
-
-     computeNumberOfVertices(level);
-
-     float[] attribs1= new float[VERT1_ATTRIBS*numVertices];
-     float[] attribs2= new float[VERT2_ATTRIBS*numVertices];
-
-     buildGrid(attribs1, attribs2, level);
-
-     if( remainingVert!=0 )
-       android.util.Log.d("MeshTriangles", "remainingVert " +remainingVert );
-
-     setAttribs(attribs1, attribs2);
-     }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Copy constructor.
- */
-  public MeshTriangles(MeshTriangles mesh, boolean deep)
-    {
-    super(mesh,deep);
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Copy the Mesh.
- *
- * @param deep If to be a deep or shallow copy of mVertAttribs1, i.e. the array holding vertices,
- *             normals and inflates (the rest, in particular the mVertAttribs2 containing texture
- *             coordinates and effect associations, is always deep copied)
- */
-  public MeshTriangles copy(boolean deep)
-    {
-    return new MeshTriangles(this,deep);
-    }
-  }
