Project

General

Profile

« Previous | Next » 

Revision e92785ba

Added by Leszek Koltunski over 5 years ago

Small things.

View differences:

src/main/java/org/distorted/library/mesh/MeshCubes.java
180 180

  
181 181
   private void prepareDataStructures(int cols, String desc, int slices)
182 182
     {
183
     mRows      =0;
184
     mCols      =0;
185
     mSlices    =slices;
186
     numVertices=0;
183
     mRows       =0;
184
     mCols       =0;
185
     mSlices     =slices;
186
     mNumVertices=0;
187 187
     
188 188
     if( cols>0 && desc.contains("1") )
189 189
       {
......
197 197
           mCubes[i][j] = (desc.charAt(i*mCols+j) == '1' ? 1:0);
198 198

  
199 199
       markRegions();
200
       numVertices = computeDataLength();
200
       mNumVertices = computeDataLength();
201 201

  
202
       remainingVert = numVertices;
202
       remainingVert = mNumVertices;
203 203
       }
204 204
     }
205 205

  
......
208 208

  
209 209
   private void prepareDataStructures(int cols, int rows, int slices)
210 210
     {
211
     mRows       =rows;
212
     mCols       =cols;
213
     mSlices     =slices;
214
     numVertices =   0;
211
     mRows        =rows;
212
     mCols        =cols;
213
     mSlices      =slices;
214
     mNumVertices =   0;
215 215

  
216 216
     if( cols>0 && rows>0 )
217 217
       {
......
222 222
           mCubes[i][j] = 1;
223 223

  
224 224
       markRegions();
225
       numVertices = computeDataLength();
225
       mNumVertices = computeDataLength();
226 226

  
227
       remainingVert = numVertices;
227
       remainingVert = mNumVertices;
228 228
       }
229 229
     }
230 230

  
......
691 691
  private void build()
692 692
     {
693 693
     int vertSoFar=0;
694
     float[] attribs= new float[(POS_DATA_SIZE+NOR_DATA_SIZE+TEX_DATA_SIZE)*numVertices];
694
     float[] attribs= new float[(POS_DATA_SIZE+NOR_DATA_SIZE+TEX_DATA_SIZE)*mNumVertices];
695 695

  
696 696
     vertSoFar = buildFrontBackGrid(true, vertSoFar,attribs);
697 697

  
......
713 713
     if( remainingVert!=0 )
714 714
       android.util.Log.e("MeshCubes", "remainingVert " +remainingVert );
715 715

  
716
     mVertAttribs = ByteBuffer.allocateDirect(numVertices*VERTSIZE).order(ByteOrder.nativeOrder()).asFloatBuffer();
716
     mVertAttribs = ByteBuffer.allocateDirect(mNumVertices*VERTSIZE).order(ByteOrder.nativeOrder()).asFloatBuffer();
717 717
     mVertAttribs.put(attribs).position(0);
718 718

  
719
     setData(numVertices, mVertAttribs);
719
     setData(mNumVertices, mVertAttribs);
720 720
     }
721 721

  
722 722
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff