commit d1a396b2db26db15f3900e7e0d8ccf6f549f343a
Author: leszek <leszek@koltunski.pl>
Date:   Tue May 16 23:30:30 2017 +0100

    Progress with any depth MeshCubes.

diff --git a/src/main/java/org/distorted/library/MeshCubes.java b/src/main/java/org/distorted/library/MeshCubes.java
index 932a88f..2f0dfbf 100644
--- a/src/main/java/org/distorted/library/MeshCubes.java
+++ b/src/main/java/org/distorted/library/MeshCubes.java
@@ -84,7 +84,7 @@ public class MeshCubes extends MeshObject
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // return the number of vertices our grid will contain
 
-   private int computeDataLength(int slices)
+   private int computeDataLength()
       {
       int frontWalls=0, frontSegments=0, triangleShifts=0, windingShifts=0;
       int shiftCol = (mCols-1)/2;
@@ -111,8 +111,8 @@ public class MeshCubes extends MeshObject
 
       int frontVert = 2*( frontWalls + 2*frontSegments - 1) +2*triangleShifts + windingShifts;
       int sideVert  = 2*( mSideWalls + mSideBends + mEdgeNum -1);
-      int firstWinding= (slices>0 && (frontVert+1)%2==1 ) ? 1:0;
-      int dataL = slices==0 ? frontVert : (frontVert+1) +firstWinding+ (1+sideVert+1) + (1+frontVert);
+      int firstWinding= (mSlices>0 && (frontVert+1)%2==1 ) ? 1:0;
+      int dataL = mSlices==0 ? frontVert : (frontVert+1) +firstWinding+ (1+sideVert+1) + (1+frontVert);
 /*
       android.util.Log.e("CUBES","triangleShifts="+triangleShifts+" windingShifts="+windingShifts+" winding1="+firstWinding+" frontVert="+frontVert+" sideVert="+sideVert);
       android.util.Log.e("CUBES", "frontW="+frontWalls+" fSegments="+frontSegments+" sWalls="+mSideWalls+" sSegments="+mEdgeNum+" sideBends="+mSideBends+" dataLen="+dataL );
@@ -188,7 +188,7 @@ public class MeshCubes extends MeshObject
        //android.util.Log.d("cubes", "VERT STRING:"+debug(mBoundingVert,3));
 
        markRegions();
-       numVertices = computeDataLength(slices);
+       numVertices = computeDataLength();
 
        remainingVert = numVertices;
        }
@@ -213,7 +213,7 @@ public class MeshCubes extends MeshObject
            mCubes[i][j] = 1;
 
        markRegions();
-       numVertices = computeDataLength(slices);
+       numVertices = computeDataLength();
 
        remainingVert = numVertices;
        }
@@ -482,13 +482,13 @@ public class MeshCubes extends MeshObject
    
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private int buildSideGrid(int vertex, int slices, float[] attribs)
+  private int buildSideGrid(int vertex, float[] attribs)
      {
      //android.util.Log.d("CUBES", "buildSide");
 
      for(int i=0; i<mEdgeNum; i++)
        {
-       vertex = buildIthSide(mEdges.get(i), vertex, slices, attribs);
+       vertex = buildIthSide(mEdges.get(i), vertex, attribs);
        } 
       
      return vertex;
@@ -496,7 +496,7 @@ public class MeshCubes extends MeshObject
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private int buildIthSide(Edge curr, int vertex, int slices, float[] attribs)
+  private int buildIthSide(Edge curr, int vertex, float[] attribs)
      {
      Edge prev; 
      
@@ -504,8 +504,8 @@ public class MeshCubes extends MeshObject
        {
        prev = new Edge(WEST,curr.row,curr.col);
        }
-     else                   // land outside; we need to move forward one link because we are going in opposite direction and we need to start from a bend.
-       {
+     else                   // land outside; we need to move forward one link because we are
+       {                    // going in opposite direction and we need to start from a bend.
        prev = curr;
        curr = new Edge(EAST,curr.row+1,curr.col-1);
        }
@@ -680,7 +680,7 @@ public class MeshCubes extends MeshObject
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-  private void build(int slices)
+  private void build()
      {
      int vertSoFar=0;
      float[] attribs= new float[(POS_DATA_SIZE+NOR_DATA_SIZE+TEX_DATA_SIZE)*numVertices];
@@ -689,7 +689,7 @@ public class MeshCubes extends MeshObject
 
      vertSoFar = buildFrontBackGrid(true, vertSoFar,attribs);
 
-     if( slices>0 )
+     if( mSlices>0 )
        {
        vertSoFar = repeatLast(vertSoFar,attribs);
        if( vertSoFar%2==1 )
@@ -701,7 +701,7 @@ public class MeshCubes extends MeshObject
 
        //android.util.Log.d("MeshCubes","building side grid...");
 
-       vertSoFar = buildSideGrid (vertSoFar,slices,attribs);
+       vertSoFar = buildSideGrid (vertSoFar,attribs);
 
        //android.util.Log.d("MeshCubes","building back grid...");
 
@@ -753,7 +753,7 @@ public class MeshCubes extends MeshObject
    {
    super( (float)slices/cols);
    prepareDataStructures(cols,desc,slices);
-   build(slices);
+   build();
    }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -768,6 +768,6 @@ public class MeshCubes extends MeshObject
    {
    super( (float)slices/cols);
    prepareDataStructures(cols,rows,slices);
-   build(slices);
+   build();
    }
  }
