Project

General

Profile

« Previous | Next » 

Revision 7d755851

Added by Leszek Koltunski over 7 years ago

Still one more problem in boundingVertices.

View differences:

src/main/java/org/distorted/library/MeshCubes.java
74 74

  
75 75
   private float[] mBoundingVert;
76 76

  
77
   private static float[] mBoundingVert1 = new float[] { -0.5f,-0.5f, FRONTZ,
78
                                                         +0.5f,-0.5f, FRONTZ,
79
                                                         -0.5f,+0.5f, FRONTZ,
80
                                                         +0.5f,+0.5f, FRONTZ };
77
   private static float[] mBoundingVert1 = new float[] { -0.5f,+0.5f, FRONTZ,
78
                                                         -0.5f,-0.5f, FRONTZ,
79
                                                         +0.5f,+0.5f, FRONTZ,
80
                                                         +0.5f,-0.5f, FRONTZ };
81 81

  
82
   private static float[] mBoundingVert2 = new float[] { -0.5f,-0.5f, FRONTZ,
83
                                                         +0.5f,-0.5f, FRONTZ,
84
                                                         -0.5f,+0.5f, FRONTZ,
82
   private static float[] mBoundingVert2 = new float[] { -0.5f,+0.5f, FRONTZ,
83
                                                         -0.5f,-0.5f, FRONTZ,
85 84
                                                         +0.5f,+0.5f, FRONTZ,
86
                                                         -0.5f,-0.5f, BACKZ ,
87
                                                         +0.5f,-0.5f, BACKZ ,
85
                                                         +0.5f,-0.5f, FRONTZ,
88 86
                                                         -0.5f,+0.5f, BACKZ ,
89
                                                         +0.5f,+0.5f, BACKZ  };
87
                                                         -0.5f,-0.5f, BACKZ ,
88
                                                         +0.5f,+0.5f, BACKZ ,
89
                                                         +0.5f,-0.5f, BACKZ  };
90 90

  
91 91
///////////////////////////////////////////////////////////////////////////////////////////////////
92 92
// a Block is split into two triangles along the NE-SW line iff it is in the top-right
......
202 202

  
203 203
       buildBoundingVert(frontOnly);
204 204

  
205
//android.util.Log.d("cubes", "VERT STRING:"+debug(mBoundingVert,3));
206

  
205 207
       markRegions();
206 208
       dataLength = computeDataLength(frontOnly);
207 209

  
......
226 228
         for(int i=0; i<mRows; i++)
227 229
           mCubes[i][j] = 1;
228 230

  
231
       mBoundingVert = frontOnly ? mBoundingVert1 : mBoundingVert2;
232

  
233
//android.util.Log.d("cubes", "VERT FULL:"+debug(mBoundingVert,3));
234

  
229 235
       markRegions();
230 236
       dataLength = computeDataLength(frontOnly);
231 237

  
232 238
       remainingVert = dataLength;
233 239
       }
234

  
235
     mBoundingVert = frontOnly ? mBoundingVert1 : mBoundingVert2;
236 240
     }
237 241

  
238 242
///////////////////////////////////////////////////////////////////////////////////////////////////
......
421 425
        mBoundingVert[3*(i+numVert)+2] = BACKZ;
422 426
        }
423 427
      }
424

  
425
//android.util.Log.d("cubes", "VERT:"+debug(mBoundingVert,3));
426 428
    }
427 429

  
428 430
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff