commit e690467857012d766ceabcfc072ec2f0f601f7c4
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Mon Aug 6 14:26:36 2018 +0100

    Progress with Effects3D app - merge Matrix effects

diff --git a/src/main/java/org/distorted/library/main/MeshCubes.java b/src/main/java/org/distorted/library/main/MeshCubes.java
index ab36813..a1bdca7 100644
--- a/src/main/java/org/distorted/library/main/MeshCubes.java
+++ b/src/main/java/org/distorted/library/main/MeshCubes.java
@@ -126,20 +126,37 @@ public class MeshCubes extends MeshObject
      }
 */
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-/*
+
    private static String debug(float[] val, int stop)
      {
      String ret="";
+     float v;
+     boolean neg;
+     int mod;
 
      for(int i=0; i<val.length; i++) 
         {
         if( i%stop==0 ) ret+="\n";
-        ret+=(" "+val[i]);
+
+        mod = i%stop;
+
+        if( mod==0 || mod==3 || mod==6 ) ret+=" (";
+
+        v = val[i];
+        if( v==-0.0f ) v=0.0f;
+
+
+        neg = v<0;
+        v = (v<0 ? -v:v);
+
+        ret+=((neg? " -":" +")+v);
+
+        if( mod==2 || mod==5 || mod==7 ) ret+=")";
         }
 
      return ret;
      }
-*/
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 /*
    private static String debug(Edge e)
@@ -676,8 +693,6 @@ public class MeshCubes extends MeshObject
      int vertSoFar=0;
      float[] attribs= new float[(POS_DATA_SIZE+NOR_DATA_SIZE+TEX_DATA_SIZE)*numVertices];
 
-     //android.util.Log.d("MeshCubes","building front grid...");
-
      vertSoFar = buildFrontBackGrid(true, vertSoFar,attribs);
 
      if( mSlices>0 )
@@ -685,23 +700,12 @@ public class MeshCubes extends MeshObject
        vertSoFar = repeatLast(vertSoFar,attribs);
        if( vertSoFar%2==1 )
          {
-         //android.util.Log.d("MeshCubes","repeating winding1 vertex");
-
          vertSoFar = repeatLast(vertSoFar,attribs);
          }
-
-       //android.util.Log.d("MeshCubes","building side grid...");
-
        vertSoFar = buildSideGrid (vertSoFar,attribs);
-
-       //android.util.Log.d("MeshCubes","building back grid...");
-
        buildFrontBackGrid (false,vertSoFar,attribs);
        }
 
-     //android.util.Log.e("MeshCubes", "dataLen="+numVertices);
-     //android.util.Log.d("MeshCubes", "attribs: "+debug(attribs,8) );
-
      mEdges.clear();
      mEdges = null;
      mCubes = null;
@@ -709,6 +713,30 @@ public class MeshCubes extends MeshObject
      if( remainingVert!=0 )
        android.util.Log.e("MeshCubes", "remainingVert " +remainingVert );
 
+/*
+     float[] attribs_good =
+     { -0.5f, +0.5f, -0.5f,  +0.0f, +1.0f, +0.0f,  +0.0f, +0.0f,
+       -0.5f, +0.5f, -0.5f,  +0.0f, +1.0f, +0.0f,  +0.0f, +0.0f,
+       -0.5f, +0.5f, +0.5f,  +0.0f, +1.0f, +0.0f,  +0.0f, +1.0f,
+       +0.5f, +0.5f, -0.5f,  +0.0f, +1.0f, +0.0f,  +1.0f, +0.0f,
+       +0.5f, +0.5f, +0.5f,  +0.0f, +1.0f, +0.0f,  +1.0f, +1.0f };
+
+     float[] attribs_hmm =
+         {   -0.5f, -0.1f, -0.5f,  +0.0f, -1.0f, +0.0f,  +0.0f, +1.0f,
+             -0.5f, -0.1f, -0.5f,  +0.0f, -1.0f, +0.0f,  +0.0f, +1.0f,
+             -0.5f, -0.1f, +0.5f,  +0.0f, -1.0f, +0.0f,  +0.0f, +0.5f,
+             +0.5f, -0.1f, -0.5f,  +0.0f, -1.0f, +0.0f,  +1.0f, +1.0f,
+             +0.5f, -0.1f, +0.5f,  +0.0f, -1.0f, +0.0f,  +1.0f, +0.5f };
+
+     float[] attribs_bad =
+     { -0.5f, +0.0f, -0.5f,  +0.0f, +1.0f, +0.0f,  +0.0f, +1.0f,
+       -0.5f, +0.0f, -0.5f,  +0.0f, +1.0f, +0.0f,  +0.0f, +1.0f,
+       -0.5f, +0.0f, +0.5f,  +0.0f, +1.0f, +0.0f,  +0.0f, +0.5f,
+       +0.5f, +0.0f, -0.5f,  +0.0f, +1.0f, +0.0f,  +1.0f, +1.0f,
+       +0.5f, +0.0f, +0.5f,  +0.0f, +1.0f, +0.0f,  +1.0f, +0.5f };
+
+     numVertices=5;
+*/
      mVertAttribs = ByteBuffer.allocateDirect(numVertices*VERTSIZE).order(ByteOrder.nativeOrder()).asFloatBuffer();
      mVertAttribs.put(attribs).position(0);
      }
