Project

General

Profile

« Previous | Next » 

Revision 4e9f2df5

Added by Leszek Koltunski almost 4 years ago

Simplify.

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java
160 160
        {-0.5f*X,-0.5f*Y,-0.5f*Z}
161 161
      };
162 162

  
163
    final int[][] vert_indices =
163
    int[][] indices =
164 164
      {
165 165
        {2,3,1,0},
166 166
        {7,6,4,5},
......
170 170
        {3,7,5,1},
171 171
      };
172 172

  
173
    return new ObjectShape(vertices, vert_indices, getNumCubitFaces(), 6);
173
    return new ObjectShape(vertices, indices, getNumCubitFaces(), 6);
174 174
    }
175 175

  
176 176
///////////////////////////////////////////////////////////////////////////////////////////////////
......
178 178
  public ObjectFaceShape getObjectFaceShape(int variant)
179 179
    {
180 180
    float defHeight = 0.048f;
181
    int[] bandIndices = new int[] { 0,0,1,1,2,2 };
182
    float[][] corners = new float[][] { {0.04f,0.15f} };
183
    int[] cornerIndices = new int[] { 0,0,0,0,0,0,0,0 };
184
    int[] centerIndices = new int[] { 0,1,2,3,4,5,6,7 };
181
    int[] bandIndices   = { 0,0,1,1,2,2 };
182
    float[][] corners   = { {0.04f,0.15f} };
183
    int[] cornerIndices = { 0,0,0,0,0,0,0,0 };
184
    int[] centerIndices = { 0,1,2,3,4,5,6,7 };
185 185

  
186 186
    int pointer = mDimPointers[variant];
187 187
    int X = mDims[pointer][0];
......
192 192
    int maxXZ = Math.max(X,Z);
193 193
    int maxYZ = Math.max(Y,Z);
194 194

  
195
    float[][] bands= new float[][]
195
    float[][] bands =
196 196
      {
197 197
        {defHeight/maxYZ,65,0.25f,0.5f,5,1,2},
198 198
        {defHeight/maxXZ,65,0.25f,0.5f,5,1,2},
199 199
        {defHeight/maxXY,65,0.25f,0.5f,5,1,2}
200 200
      };
201 201

  
202
    float[][] centers = new float[][]
202
    float[][] centers =
203 203
      {
204 204
        {+0.5f*(X-1),+0.5f*(Y-1),+0.5f*(Z-1)},
205 205
        {+0.5f*(X-1),+0.5f*(Y-1),-0.5f*(Z-1)},
src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java
216 216

  
217 217
  public ObjectShape getObjectShape(int variant)
218 218
    {
219
    float[][] vertices = new float[][]
219
    float[][] vertices =
220 220
          {
221 221
              { 0.5f, 0.5f, 0.5f },
222 222
              { 0.5f, 0.5f,-0.5f },
......
228 228
              {-0.5f,-0.5f,-0.5f },
229 229
          };
230 230

  
231
    int[][] vert_indices = new int[][]
231
    int[][] indices =
232 232
          {
233 233
              {2,3,1,0},
234 234
              {7,6,4,5},
......
238 238
              {3,7,5,1}
239 239
          };
240 240

  
241
    return new ObjectShape(vertices, vert_indices, getNumCubitFaces(), 1);
241
    return new ObjectShape(vertices, indices, getNumCubitFaces(), 1);
242 242
    }
243 243

  
244 244
///////////////////////////////////////////////////////////////////////////////////////////////////
......
257 257
        default: num = 5; extraI = 0; extraV = 0; height = 0.045f; break;
258 258
        }
259 259

  
260
    float[][] corners= new float[][] { {0.036f,0.12f} };
261
    float[][] centers= new float[][] { {0.0f, 0.0f, 0.0f} };
262
    int[] indices    = new int[] { 0,0,0,0,0,0,0,0 };
263
    float[][] bands  = new float[][]
260
    float[][] corners= { {0.036f,0.12f} };
261
    float[][] centers= { {0.0f, 0.0f, 0.0f} };
262
    int[] indices    = { 0,0,0,0,0,0,0,0 };
263
    float[][] bands  =
264 264
         {
265 265
             {height,35,0.5f,0.7f,num,extraI,extraV},
266 266
             {     0,35,0.5f,0.7f,  2, num-2,extraV},
src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java
375 375
    {
376 376
    if( variant==0 )
377 377
      {
378
      float[][] vertices = new float[][]
378
      float[][] vertices =
379 379
          {
380 380
             { 0.5f,  0.0f, 0.5f},
381 381
             { 0.5f,  0.0f,-0.5f},
......
385 385
             { 0.0f,-SQ2/2, 0.0f}
386 386
          };
387 387

  
388
      int[][] vert_indices = new int[][]
388
      int[][] indices =
389 389
          {
390 390
             {3,0,4},
391 391
             {0,1,4},
......
397 397
             {5,3,2}
398 398
          };
399 399

  
400
      return new ObjectShape(vertices, vert_indices, getNumCubitFaces(), 1);
400
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 1);
401 401
      }
402 402
    else
403 403
      {
404
      float[][] vertices  = new float[][] { {-0.5f, SQ2/4, 0.0f}, { 0.5f, SQ2/4, 0.0f}, { 0.0f,-SQ2/4, 0.5f}, { 0.0f,-SQ2/4,-0.5f} };
405
      int[][] vert_indices= new int[][]  { {2,1,0}, {2,3,1}, {3,2,0}, {3,0,1} };
406
      return new ObjectShape(vertices,vert_indices, getNumCubitFaces(), 1);
404
      float[][] vertices= { {-0.5f, SQ2/4, 0.0f}, { 0.5f, SQ2/4, 0.0f}, { 0.0f,-SQ2/4, 0.5f}, { 0.0f,-SQ2/4,-0.5f} };
405
      int[][] indices   = { {2,1,0}, {2,3,1}, {3,2,0}, {3,0,1} };
406
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 1);
407 407
      }
408 408
    }
409 409

  
......
413 413
    {
414 414
    int numL = getNumLayers()[0];
415 415
    int N = numL>3 ? 5:6;
416
    int E = numL>2 ? (numL>3 ? 0:1):2;
416
    int E = numL>2 ? (numL>3 ? 0:1) : 2;
417 417

  
418 418
    if( variant==0 )
419 419
      {
420
      float[][] bands     = new float[][] { {0.05f,35,0.5f,0.8f,N,E,E} };
421
      int[] bandIndices   = new int[] { 0,0,0,0,0,0,0,0 };
422
      float[][] corners   = new float[][] { {0.04f,0.20f} };
423
      int[] cornerIndices = new int[] { 0,0,0,0,0,0 };
424
      float[][] centers   = new float[][] { {0.0f, 0.0f, 0.0f} };
425
      int[] centerIndices = new int[] { 0,0,0,0,0,0 };
420
      float[][] bands     = { {0.05f,35,0.5f,0.8f,N,E,E} };
421
      int[] bandIndices   = { 0,0,0,0,0,0,0,0 };
422
      float[][] corners   = { {0.04f,0.20f} };
423
      int[] cornerIndices = { 0,0,0,0,0,0 };
424
      float[][] centers   = { {0.0f, 0.0f, 0.0f} };
425
      int[] centerIndices = { 0,0,0,0,0,0 };
426 426
      return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null);
427 427
      }
428 428
    else
429 429
      {
430
      float[][] bands     = new float[][] { {0.05f,35,0.5f,0.8f,N,E,E} };
431
      int[] bandIndices   = new int[] { 0,0,0,0 };
432
      float[][] corners   = new float[][] { {0.08f,0.15f} };
433
      int[] cornerIndices = new int[] { 0,0,0,0 };
434
      float[][] centers   = new float[][] { {0.0f, 0.0f, 0.0f} };
435
      int[] centerIndices = new int[] { 0,0,0,0 };
430
      float[][] bands     = { {0.05f,35,0.5f,0.8f,N,E,E} };
431
      int[] bandIndices   = { 0,0,0,0 };
432
      float[][] corners   = { {0.08f,0.15f} };
433
      int[] cornerIndices = { 0,0,0,0 };
434
      float[][] centers   = { {0.0f, 0.0f, 0.0f} };
435
      int[] centerIndices = { 0,0,0,0 };
436 436
      return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null);
437 437
      }
438 438
    }
src/main/java/org/distorted/objectlib/objects/TwistyDino.java
185 185

  
186 186
  public ObjectShape getObjectShape(int variant)
187 187
    {
188
    float[][] vertices  = new float[][] { {-1.5f, 0.0f, 0.0f},{ 1.5f, 0.0f, 0.0f},{ 0.0f,-1.5f, 0.0f},{ 0.0f, 0.0f,-1.5f} };
189
    int[][] vert_indices= new int[][] { {2,1,0},{3,0,1},{2,3,1},{3,2,0} };
190
    return new ObjectShape(vertices, vert_indices, getNumCubitFaces(), 2);
188
    float[][] vertices= { {-1.5f, 0.0f, 0.0f},{ 1.5f, 0.0f, 0.0f},{ 0.0f,-1.5f, 0.0f},{ 0.0f, 0.0f,-1.5f} };
189
    int[][] indices   = { {2,1,0},{3,0,1},{2,3,1},{3,2,0} };
190
    return new ObjectShape(vertices, indices, getNumCubitFaces(), 2);
191 191
    }
192 192

  
193 193
///////////////////////////////////////////////////////////////////////////////////////////////////
194 194

  
195 195
  public ObjectFaceShape getObjectFaceShape(int variant)
196 196
    {
197
    float[][] bands     = new float[][] { {0.035f,30,0.16f,0.8f,6,2,2}, {0.010f,30,0.16f,0.2f,6,2,2} };
198
    int[] bandIndices   = new int[] { 0,0,1,1 };
199
    float[][] corners   = new float[][] { {0.07f,0.40f}, {0.05f,0.30f} };
200
    int[] cornerIndices = new int[] { 0,0,1,1 };
201
    float[][] centers   = new float[][] { {0.0f, -0.75f, -0.75f} };
202
    int[] centerIndices = new int[] { 0,0,0,0 };
197
    float[][] bands     = { {0.035f,30,0.16f,0.8f,6,2,2}, {0.010f,30,0.16f,0.2f,6,2,2} };
198
    int[] bandIndices   = { 0,0,1,1 };
199
    float[][] corners   = { {0.07f,0.40f}, {0.05f,0.30f} };
200
    int[] cornerIndices = { 0,0,1,1 };
201
    float[][] centers   = { {0.0f, -0.75f, -0.75f} };
202
    int[] centerIndices = { 0,0,0,0 };
203 203
    return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices, null);
204 204
    }
205 205

  
src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java
281 281
    {
282 282
    if( variant==0 )
283 283
      {
284
      float[][] vertices = new float[][]
284
      float[][] vertices =
285 285
        { {-1.50f, 0.00f, 0.00f},{ 0.00f,-1.50f, 0.00f},{ 0.00f, 0.00f,-1.50f},{-0.75f,-0.75f,-0.75f},{ 0.00f, 0.00f, 0.00f} };
286

  
287
      int[][] vert_indices = new int[][]
288
          { {0,1,4},{2,0,4},{1,2,4},{3,1,0},{3,2,1},{3,0,2} };
289

  
290
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),3);
286
      int[][] indices = { {0,1,4},{2,0,4},{1,2,4},{3,1,0},{3,2,1},{3,0,2} };
287
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 3);
291 288
      }
292 289
    else
293 290
      {
294
      float[][] vertices = new float[][]
291
      float[][] vertices =
295 292
        { { 0.50f, 0.50f, 0.00f }, {-1.00f, 0.50f, 0.00f }, { 0.50f,-1.00f, 0.00f }, {-0.25f,-0.25f,-0.75f } };
296

  
297
      int[][] vert_indices = new int[][]
298
        { { 0,1,2 },{ 2,1,3 },{ 0,1,3 },{ 2,0,3 } };
299

  
300
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),1);
293
      int[][] indices = { { 0,1,2 },{ 2,1,3 },{ 0,1,3 },{ 2,0,3 } };
294
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 1);
301 295
      }
302 296
    }
303 297

  
......
307 301
    {
308 302
    if( variant==0 )
309 303
      {
310
      float[][] bands     = new float[][] { {0.028f,35,0.16f,0.7f,7,3,3}, {0.000f, 0,1.00f,0.0f,3,1,5} };
311
      int[] bandIndices   = new int[] { 0,0,0,1,1,1 };
312
      float[][] corners   = new float[][] { {0.08f,0.20f} };
313
      int[] cornerIndices = new int[] { 0,0,0,0,0 };
314
      float[][] centers   = new float[][] { {-0.75f, -0.75f, -0.75f} };
315
      int[] centerIndices = new int[] { 0,0,0,-1,0 };
304
      float[][] bands     = { {0.028f,35,0.16f,0.7f,7,3,3}, {0.000f, 0,1.00f,0.0f,3,1,5} };
305
      int[] bandIndices   = { 0,0,0,1,1,1 };
306
      float[][] corners   = { {0.08f,0.20f} };
307
      int[] cornerIndices = { 0,0,0,0,0 };
308
      float[][] centers   = { {-0.75f, -0.75f, -0.75f} };
309
      int[] centerIndices = { 0,0,0,-1,0 };
316 310
      return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null);
317 311
      }
318 312
    else
319 313
      {
320
      float[][] bands     = new float[][] { {0.028f,35,0.16f,0.7f,7,3,3}, {0.000f, 0,1.00f,0.0f,3,1,3} };
321
      int[] bandIndices   = new int[] { 0,1,1,1 };
322
      float[][] corners   = new float[][] { {0.06f,0.20f} };
323
      int[] cornerIndices = new int[] { 0,0,0,-1 };
324
      float[][] centers   = new float[][] { {-0.25f, -0.25f, -0.75f} };
325
      int[] centerIndices = new int[] { 0,0,0,-1 };
314
      float[][] bands     = { {0.028f,35,0.16f,0.7f,7,3,3}, {0.000f, 0,1.00f,0.0f,3,1,3} };
315
      int[] bandIndices   = { 0,1,1,1 };
316
      float[][] corners   = { {0.06f,0.20f} };
317
      int[] cornerIndices = { 0,0,0,-1 };
318
      float[][] centers   = { {-0.25f, -0.25f, -0.75f} };
319
      int[] centerIndices = { 0,0,0,-1 };
326 320
      return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null);
327 321
      }
328 322
    }
src/main/java/org/distorted/objectlib/objects/TwistyIvy.java
336 336
    {
337 337
    if( variant==0 )
338 338
      {
339
      int[] cornerIndices= new int[3*(IVY_N+1)+4];
340
      int[] centerIndices= new int[3*(IVY_N+1)+4];
341 339
      float[][] centers  = { {-1.0f,-1.0f,-1.0f} };
342 340
      float[][] corners  = { {0.05f,0.20f}, {0.04f,0.20f} };
343 341
      int[] bandIndices  = { 0,0,0,1,1,1 };
344 342
      float[][] bands    = { {+0.015f,20,0.2f,0.5f,7,1,2}, {-0.100f,20,0.2f,0.0f,2,1,2} };
345 343

  
344
      int[] cornerIndices= new int[3*(IVY_N+1)+4];
345
      int[] centerIndices= new int[3*(IVY_N+1)+4];
346

  
346 347
      for(int i=0; i<3*(IVY_N+1); i++)
347 348
        {
348 349
        cornerIndices[i+4] = -1;
......
360 361
      centerIndices[3] = 0;
361 362

  
362 363
      float C = 1-SQ2/2;
363
      float[] convexCenter = new float[] {-C,-C,-C};
364
      float[] convexCenter = {-C,-C,-C};
364 365
      return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,convexCenter);
365 366
      }
366 367
    else
367 368
      {
368
      int[] bandIndices= new int[] { 0,1 };
369
      int[] indexes    = new int[2*IVY_N];
370
      float[][] corners= new float[][] { {0.05f,0.20f} };
371
      float[][] centers= new float[][] { {-0.0f,-0.0f,-1.0f} };
369
      int[] bandIndices= { 0,1 };
370
      float[][] corners= { {0.05f,0.20f} };
371
      float[][] centers= { {-0.0f,-0.0f,-1.0f} };
372 372
      float[][] bands  = { {+0.03f,35,0.5f,0.5f,5,0,0}, {-0.10f,45,0.5f,0.0f,2,0,0} };
373 373

  
374
      int[] indexes = new int[2*IVY_N];
374 375
      for(int i=0; i<2*IVY_N; i++) indexes[i] = -1;
375 376
      indexes[0] = indexes[IVY_N] = 0;
376 377

  
src/main/java/org/distorted/objectlib/objects/TwistyJing.java
241 241

  
242 242
    if( variant==0 )
243 243
      {
244
      float[][] vertices = new float[][]
244
      float[][] vertices =
245 245
          {
246 246
             {   0,   0,   0 },
247 247
             {   X,   Y,   Z },
......
252 252
             {   0, 2*Y, 2*Z-F },
253 253
             {  -X,   Y,   Z-F },
254 254
          };
255
      int[][] vert_indices = new int[][]
255
      int[][] indices =
256 256
          {
257 257
             {0,1,2,3},
258 258
             {1,0,4,5},
......
262 262
             {4,7,6,5}
263 263
          };
264 264

  
265
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(), 3);
265
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 3);
266 266
      }
267 267
    else if( variant==1 )
268 268
      {
269
      float[][] vertices = new float[][]
269
      float[][] vertices =
270 270
          {
271 271
             {   0,   0,     G },
272 272
             {   X,   Y,   Z+G },
......
277 277
             {   0, 2*Y,-2*Z-G },
278 278
             {  -X,   Y,  -Z-G },
279 279
          };
280
      int[][] vert_indices = new int[][]
280
      int[][] indices =
281 281
          {
282 282
             {0,4,5,1},
283 283
             {3,7,4,0},
......
287 287
             {2,6,7,3}
288 288
          };
289 289

  
290
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),2);
290
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 2);
291 291
      }
292 292
    else
293 293
      {
294
      float[][] vertices = new float[][]
294
      float[][] vertices =
295 295
          {
296 296
             {        0,   -2*Y2/3,       -2*Z2/3 },
297 297
             {       X2,      Y2/3,          Z2/3 },
......
300 300
             {  X2-D*X2, Y2/3-D*Y2,     Z2/3+D*Z2 },
301 301
             { -X2+D*X2, Y2/3-D*Y2,     Z2/3+D*Z2 },
302 302
          };
303
      int[][] vert_indices = new int[][]
303
      int[][] indices =
304 304
          {
305 305
             {0,1,2},
306 306
             {3,5,4},
......
309 309
             {4,5,2,1}
310 310
          };
311 311

  
312
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),1);
312
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 1);
313 313
      }
314 314
    }
315 315

  
......
323 323

  
324 324
    if( variant==0 )
325 325
      {
326
      float[][] bands     = new float[][] { {0.015f,35,0.25f*F,0.5f*F,5,1,1},{0.001f,35,0.25f*F,0.5f*F,5,1,1} };
327
      int[] bandIndices   = new int[] { 0,0,0,1,1,1 };
328
      float[][] corners   = new float[][] { {0.08f,0.20f*F},{0.07f,0.20f*F} };
329
      int[] cornerIndices = new int[] { 0,1,1,-1,1,-1,-1,-1 };
330
      float[][] centers   = new float[][] { { 0.0f, Y, Z-F/2} };
331
      int[] centerIndices = new int[] { 0,0,0,-1,0,-1,-1,-1 };
326
      float[][] bands     = { {0.015f,35,0.25f*F,0.5f*F,5,1,1},{0.001f,35,0.25f*F,0.5f*F,5,1,1} };
327
      int[] bandIndices   = { 0,0,0,1,1,1 };
328
      float[][] corners   = { {0.08f,0.20f*F},{0.07f,0.20f*F} };
329
      int[] cornerIndices = { 0,1,1,-1,1,-1,-1,-1 };
330
      float[][] centers   = { { 0.0f, Y, Z-F/2} };
331
      int[] centerIndices = { 0,0,0,-1,0,-1,-1,-1 };
332 332
      return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null);
333 333
      }
334 334
    else if( variant==1 )
335 335
      {
336
      float[][] bands     = new float[][] { {0.015f,35,0.5f*F,F,5,1,1},{0.001f,35,0.5f*F,F,5,1,1} };
337
      int[] bandIndices   = new int[] { 0,0,1,1,1,1 };
338
      float[][] corners   = new float[][] { {0.07f,0.20f*F} };
339
      int[] cornerIndices = new int[] { 0,0,-1,0,0,0,-1,0 };
340
      float[][] centers   = new float[][] { { 0, F*SQ2/2, 0 } };
341
      int[] centerIndices = new int[] { 0,0,-1,0,0,0,-1,0 };
336
      float[][] bands     = { {0.015f,35,0.5f*F,F,5,1,1},{0.001f,35,0.5f*F,F,5,1,1} };
337
      int[] bandIndices   = { 0,0,1,1,1,1 };
338
      float[][] corners   = { {0.07f,0.20f*F} };
339
      int[] cornerIndices = { 0,0,-1,0,0,0,-1,0 };
340
      float[][] centers   = { { 0, F*SQ2/2, 0 } };
341
      int[] centerIndices = { 0,0,-1,0,0,0,-1,0 };
342 342
      return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null);
343 343
      }
344 344
    else
345 345
      {
346
      float[][] bands     = new float[][] { {0.020f,35,0.20f*L,0.6f*L,5,1,1}, {0.001f,35,0.05f*L,0.1f*L,5,1,1} };
347
      int[] bandIndices   = new int[] { 0,1,1,1,1,1 };
348
      float[][] corners   = new float[][] { {0.04f,0.6f*F} };
349
      int[] cornerIndices = new int[] { 0,0,0,-1,-1,-1 };
350
      float[][] centers   = new float[][] { { 0, -2*Y/3, 4*Z/3 } };
351
      int[] centerIndices = new int[] { 0,0,0,-1,-1,-1 };
346
      float[][] bands     = { {0.020f,35,0.20f*L,0.6f*L,5,1,1}, {0.001f,35,0.05f*L,0.1f*L,5,1,1} };
347
      int[] bandIndices   = { 0,1,1,1,1,1 };
348
      float[][] corners   = { {0.04f,0.6f*F} };
349
      int[] cornerIndices = { 0,0,0,-1,-1,-1 };
350
      float[][] centers   = { { 0, -2*Y/3, 4*Z/3 } };
351
      int[] centerIndices = { 0,0,0,-1,-1,-1 };
352 352
      return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null);
353 353
      }
354 354
    }
src/main/java/org/distorted/objectlib/objects/TwistyKilominx.java
316 316
      float Y = width*SIN18;
317 317
      float Z = width*COS18*COS_HALFD;
318 318

  
319
      float[][] vertices = new float[][]
319
      float[][] vertices =
320 320
        {
321 321
            {   0,   0      ,   0 },
322 322
            {   X,   Y      ,  -Z },
......
328 328
            {  -X,   Y-width,  -Z },
329 329
        };
330 330

  
331
      int[][] vertIndexes = new int[][]
331
      int[][] indices =
332 332
        {
333 333
            {4,5,1,0},
334 334
            {7,4,0,3},
......
338 338
            {7,6,2,3}
339 339
        };
340 340

  
341
      return new ObjectShape(vertices,vertIndexes,getNumCubitFaces(),3);
341
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 3);
342 342
      }
343 343
    if( variant<numVariants-1 )
344 344
      {
......
352 352
      float Y = height*SIN18/COS18;
353 353
      float Z = height*COS_HALFD;
354 354

  
355
      float[][] vertices = new float[][]
355
      float[][] vertices =
356 356
        {
357 357
            {   0,   0   ,   0 },
358 358
            {   X,   Y   ,  -Z },
......
364 364
            {  -X, -width,  -Z },
365 365
        };
366 366

  
367
      int[][] vertIndexes = new int[][]
367
      int[][] indices =
368 368
        {
369 369
            {4,5,1,0},
370 370
            {7,4,0,3},
......
379 379
        int tmp, len = vertices.length;
380 380
        for(int i=0; i<len; i++) vertices[i][1] = -vertices[i][1];
381 381

  
382
        len = vertIndexes.length;
382
        len = indices.length;
383 383
        for(int i=0; i<len; i++)
384 384
          {
385
          tmp = vertIndexes[i][0];
386
          vertIndexes[i][0] = vertIndexes[i][3];
387
          vertIndexes[i][3] = tmp;
388
          tmp = vertIndexes[i][1];
389
          vertIndexes[i][1] = vertIndexes[i][2];
390
          vertIndexes[i][2] = tmp;
385
          tmp = indices[i][0];
386
          indices[i][0] = indices[i][3];
387
          indices[i][3] = tmp;
388
          tmp = indices[i][1];
389
          indices[i][1] = indices[i][2];
390
          indices[i][2] = tmp;
391 391
          }
392 392
        }
393 393

  
394
      return new ObjectShape(vertices,vertIndexes,getNumCubitFaces(),2);
394
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 2);
395 395
      }
396 396
    else
397 397
      {
......
405 405
      float Z3= H*COS_HALFD;
406 406
      float C = 1/(COS54*(float)Math.sqrt(2-2*SIN18));
407 407

  
408
      float[][] vertices = new float[][]
408
      float[][] vertices =
409 409
        {
410 410
            {   0,   0  ,     0 },
411 411
            {   X,   Y  ,    -Z },
......
417 417
            { -X3,-width,   -Z3 }
418 418
        };
419 419

  
420
      int[][] vertIndexes = new int[][]
420
      int[][] indices =
421 421
        {
422 422
            {4,5,1,0},
423 423
            {7,4,0,3},
......
427 427
            {4,5,6,7}
428 428
        };
429 429

  
430
      return new ObjectShape(vertices,vertIndexes,getNumCubitFaces(), 1);
430
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 1);
431 431
      }
432 432
    }
433 433

  
src/main/java/org/distorted/objectlib/objects/TwistyMegaminx.java
258 258
      float Y = width*SIN18;
259 259
      float Z = width*COS18*COS_HALFD;
260 260

  
261
      float[][] vertices = new float[][]
261
      float[][] vertices =
262 262
        {
263 263
            {   0,   0      ,   0 },
264 264
            {   X,   Y      ,  -Z },
......
270 270
            {  -X,   Y-width,  -Z },
271 271
        };
272 272

  
273
      int[][] vertIndexes = new int[][]
273
      int[][] indices =
274 274
        {
275 275
            {4,5,1,0},
276 276
            {7,4,0,3},
......
280 280
            {7,6,2,3}
281 281
        };
282 282

  
283
      return new ObjectShape(vertices,vertIndexes,getNumCubitFaces(),3);
283
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 3);
284 284
      }
285 285
    if( variant<numVariants-1 )
286 286
      {
......
293 293
      float Y = height*SIN18/COS18;
294 294
      float Z = height*COS_HALFD;
295 295

  
296
      float[][] vertices = new float[][]
296
      float[][] vertices =
297 297
        {
298 298
            {   0,   W   ,   0 },
299 299
            {   X, W+Y   ,  -Z },
......
305 305
            {  -X,-W-Y   ,  -Z },
306 306
        };
307 307

  
308
      int[][] vertIndexes = new int[][]
308
      int[][] indices =
309 309
        {
310 310
            {4,5,1,0},
311 311
            {7,4,0,3},
......
315 315
            {4,5,6,7}
316 316
        };
317 317

  
318
      return new ObjectShape(vertices,vertIndexes,getNumCubitFaces(),2);
318
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 2);
319 319
      }
320 320
    else
321 321
      {
......
330 330
      float X2 = R*COS18;
331 331
      float Y2 = R*SIN18;
332 332

  
333
      float[][] vertices = new float[][]
333
      float[][] vertices =
334 334
        {
335 335
          {-X1,+Y1*sinA, Y1*cosA},
336 336
          {-X2,-Y2*sinA,-Y2*cosA},
......
340 340
          { 0 , R*cosA ,-R*sinA }
341 341
        };
342 342

  
343
      int[][] vertIndexes = new int[][]
343
      int[][] indices =
344 344
        {
345 345
          {0,1,2,3,4},
346 346
          {0,1,5},
......
350 350
          {4,0,5}
351 351
        };
352 352

  
353
      return new ObjectShape(vertices,vertIndexes,getNumCubitFaces(),1);
353
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 1);
354 354
      }
355 355
    }
356 356

  
src/main/java/org/distorted/objectlib/objects/TwistyMirror.java
196 196
    float ZL = -0.5f - (zrow==     0 ? DZ : 0);
197 197
    float ZR = +0.5f - (zrow==numL-1 ? DZ : 0);
198 198

  
199
    float[][] vertices = new float[][]
199
    float[][] vertices =
200 200
          {
201 201
              { XR, YR, ZR },
202 202
              { XR, YR, ZL },
......
208 208
              { XL, YL, ZL },
209 209
          };
210 210

  
211
    int[][] vert_indices = new int[][]
211
    int[][] indices =
212 212
          {
213 213
              {2,3,1,0},
214 214
              {7,6,4,5},
......
218 218
              {3,7,5,1}
219 219
          };
220 220

  
221
    return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),6);
221
    return new ObjectShape(vertices, indices, getNumCubitFaces(), 6);
222 222
    }
223 223

  
224 224
///////////////////////////////////////////////////////////////////////////////////////////////////
src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java
292 292
    {
293 293
    if( variant==0 )
294 294
      {
295
      float[][] vertices = new float[][] { { 0.5f,0.0f,0.5f},{ 0.5f,0.0f,-0.5f},{-0.5f,0.0f,-0.5f},{-0.5f,0.0f,0.5f},{ 0.0f,SQ2/2,0.0f},{ 0.0f,-SQ2/2,0.0f} };
296
      int[][] vert_indices = new int[][] { {3,0,4},{0,1,4},{1,2,4},{2,3,4},{5,0,3},{5,1,0},{5,2,1},{5,3,2} };
297
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),1);
295
      float[][] vertices= { { 0.5f,0.0f,0.5f},{ 0.5f,0.0f,-0.5f},{-0.5f,0.0f,-0.5f},{-0.5f,0.0f,0.5f},{ 0.0f,SQ2/2,0.0f},{ 0.0f,-SQ2/2,0.0f} };
296
      int[][] indices   = { {3,0,4},{0,1,4},{1,2,4},{2,3,4},{5,0,3},{5,1,0},{5,2,1},{5,3,2} };
297
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 1);
298 298
      }
299 299
    else
300 300
      {
301
      float[][] vertices = new float[][] { {-0.5f, SQ2/4, 0.0f},{ 0.5f, SQ2/4, 0.0f},{ 0.0f,-SQ2/4, 0.5f},{ 0.0f,-SQ2/4,-0.5f} };
302
      int[][] vert_indices = new int[][] { {2,1,0},{3,0,1},{3,2,0},{2,3,1} };
303
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),1);
301
      float[][] vertices= { {-0.5f, SQ2/4, 0.0f},{ 0.5f, SQ2/4, 0.0f},{ 0.0f,-SQ2/4, 0.5f},{ 0.0f,-SQ2/4,-0.5f} };
302
      int[][] indices   = { {2,1,0},{3,0,1},{3,2,0},{2,3,1} };
303
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 1);
304 304
      }
305 305
    }
306 306

  
src/main/java/org/distorted/objectlib/objects/TwistyRedi.java
243 243
    {
244 244
    if( variant==0 )
245 245
      {
246
      float[][] vertices = new float[][]
246
      float[][] vertices =
247 247
          {
248 248
             { 0.0f, 0.0f, 0.0f },
249 249
             {-0.5f, 0.5f, 0.5f },
......
255 255
             {-0.5f, 0.5f,-0.5f },
256 256
          };
257 257

  
258
      int[][] vert_indices = new int[][]
258
      int[][] indices =
259 259
          {
260 260
             { 2,4,3,1 },
261 261
             { 1,3,5,7 },
......
269 269
             { 6,5,0 }
270 270
          };
271 271

  
272
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),3);
272
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 3);
273 273
      }
274 274
    else
275 275
      {
276
      float[][] vertices = new float[][]
276
      float[][] vertices =
277 277
          {
278 278
             {-0.5f, 0.0f, 0.0f},
279 279
             { 0.5f, 0.0f, 0.0f},
......
285 285
             { 0.0f, 0.0f,-1.5f},
286 286
          };
287 287

  
288
      int[][] vert_indices = new int[][]
288
      int[][] indices =
289 289
          {
290 290
             { 0,2,4,3,1 },
291 291
             { 0,1,6,7,5 },
......
295 295
             { 4,7,5,2 }
296 296
          };
297 297

  
298
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),2);
298
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 2);
299 299
      }
300 300
    }
301 301

  
src/main/java/org/distorted/objectlib/objects/TwistyRex.java
258 258
    {
259 259
    if( variant==0 )
260 260
      {
261
      float[][] vertices ={{-0.10f,0.70f,0},{-0.70f,0.10f,0},{+0.65f,-0.71f,0},{+0.71f,-0.65f,0},{0,0.05f,-0.2f} };
262
      int[][] vertIndexes = { {0,1,2,3},{0,3,4},{3,2,4},{2,1,4},{1,0,4} };
263
      return new ObjectShape(vertices,vertIndexes,getNumCubitFaces(),1);
261
      float[][] vertices= { {-0.10f,0.70f,0},{-0.70f,0.10f,0},{+0.65f,-0.71f,0},{+0.71f,-0.65f,0},{0,0.05f,-0.2f} };
262
      int[][] indices   = { {0,1,2,3},{0,3,4},{3,2,4},{2,1,4},{1,0,4} };
263
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 1);
264 264
      }
265 265
    else if( variant==1 )
266 266
      {
267 267
      float G = 3*REX_D;
268 268
      float[][] vertices= { { -G, 0, 0 },{ 0,-G, 0 },{ +G, 0, 0 },{ 0,+G,0 },{ 0, 0,-G} };
269
      int[][] vertIndexes= { {0,1,2,3},{0,3,4},{3,2,4},{2,1,4},{1,0,4} };
270
      return new ObjectShape(vertices,vertIndexes,getNumCubitFaces(),1);
269
      int[][] indices   = { {0,1,2,3},{0,3,4},{3,2,4},{2,1,4},{1,0,4} };
270
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 1);
271 271
      }
272 272
    else
273 273
      {
274 274
      float E = 1.5f - 3*REX_D;
275 275
      float F = 1.5f;
276
      float[][] vertices = { { -F, 0, 0 },{  0,-E, 0 },{ +F, 0, 0 },{  0, 0,-E } };
277
      int[][] vertIndexes = { {0,1,2}, {0,2,3}, {0,3,1}, {1,3,2} };
278
      return new ObjectShape(vertices,vertIndexes,getNumCubitFaces(),2);
276
      float[][] vertices= { { -F, 0, 0 },{  0,-E, 0 },{ +F, 0, 0 },{  0, 0,-E } };
277
      int[][] indices   = { {0,1,2}, {0,2,3}, {0,3,1}, {1,3,2} };
278
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 2);
279 279
      }
280 280
    }
281 281

  
......
291 291
      int[] indices    = {-1,-1,0,0,-1};
292 292
      int[] bandIndices= { 0,1,1,1,1 };
293 293
      float[][] bands  = { {+0.016f,10,G/3,0.5f,5,1,1},{ +0.0f,45,0.1f,0.1f,2,0,0} };
294

  
295 294
      return new ObjectFaceShape(bands,bandIndices,corners,indices,centers,indices,null);
296 295
      }
297 296
    else if( variant==1 )
......
300 299
      int[] indices    = {-1,-1,-1,-1,-1};
301 300
      int[] bandIndices= { 0,1,1,1,1 };
302 301
      float[][] bands  = { {0.025f,10,G/2,0.5f,5,0,0},{0.000f,45,G/2,0.0f,2,0,0} };
303

  
304 302
      return new ObjectFaceShape(bands,bandIndices,null,indices,null,indices,null);
305 303
      }
306 304
    else
......
313 311
      int[] indices    = { 0,-1,0,-1 };
314 312
      int[] bandIndices= { 0,0,1,1 };
315 313
      float[][] bands  = { {0.03f,27,F/3,0.8f,5,2,3},{0.01f,45,G/3,0.2f,3,1,2} };
316

  
317 314
      return new ObjectFaceShape(bands,bandIndices,corners,indices,centers,indices,null);
318 315
      }
319 316
    }
src/main/java/org/distorted/objectlib/objects/TwistySkewb.java
413 413
    {
414 414
    if( variant==0 )
415 415
      {
416
      float[][] vertices   = { {-1,0,0},{0,-1,0},{0,0,-1},{-1,-1,-1},{0,0,0} };
417
      int[][] vert_indices = { {0,1,4},{2,0,4},{1,2,4},{3,1,0},{3,2,1},{3,0,2} };
418
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),3);
416
      float[][] vertices= { {-1,0,0},{0,-1,0},{0,0,-1},{-1,-1,-1},{0,0,0} };
417
      int[][] indices   = { {0,1,4},{2,0,4},{1,2,4},{3,1,0},{3,2,1},{3,0,2} };
418
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 3);
419 419
      }
420 420
    else if( variant==1 )
421 421
      {
422
      float[][] vertices   = { {-1,0,0},{0,-1,0},{1,0,0},{0,1,0},{0,0,-1} };
423
      int[][] vert_indices = { {0,1,2,3},{4,1,0},{4,2,1},{4,3,2},{4,0,3} };
424
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),1);
422
      float[][] vertices= { {-1,0,0},{0,-1,0},{1,0,0},{0,1,0},{0,0,-1} };
423
      int[][] indices   = { {0,1,2,3},{4,1,0},{4,2,1},{4,3,2},{4,0,3} };
424
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 1);
425 425
      }
426 426
    else
427 427
      {
428
      float[][] vertices   = { {-1,0,0},{1,0,0},{0,-1,0},{0,0,-1} };
429
      int[][] vert_indices = { {2,1,0},{3,0,1},{2,3,1},{3,2,0} };
430
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),2);
428
      float[][] vertices= { {-1,0,0},{1,0,0},{0,-1,0},{0,0,-1} };
429
      int[][] indices   = { {2,1,0},{3,0,1},{2,3,1},{3,2,0} };
430
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 2);
431 431
      }
432 432
    }
433 433

  
......
442 442
      int N = numL==2 ? 7:5;
443 443
      int E1= numL==2 ? 3:2;
444 444
      int E2= numL==2 ? 5:3;
445
      float[][] bands     = new float[][] { {0.020f,35,0.16f,0.7f,N,E1,E1}, {0.000f, 0,1.00f,0.0f,3,1,E2} };
446
      int[] bandIndices   = new int[] { 0,0,0,1,1,1 };
447
      float[][] corners   = new float[][] { {0.05f,0.25f}, {0.05f,0.20f} };
448
      int[] cornerIndices = new int[] { 1,1,1,0,0 };
449
      float[][] centers   = new float[][] { {-0.5f, -0.5f, -0.5f} };
450
      int[] centerIndices = new int[] { 0,0,0,-1,0 };
445
      float[][] bands     = { {0.020f,35,0.16f,0.7f,N,E1,E1}, {0.000f, 0,1.00f,0.0f,3,1,E2} };
446
      int[] bandIndices   = { 0,0,0,1,1,1 };
447
      float[][] corners   = { {0.05f,0.25f}, {0.05f,0.20f} };
448
      int[] cornerIndices = { 1,1,1,0,0 };
449
      float[][] centers   = { {-0.5f, -0.5f, -0.5f} };
450
      int[] centerIndices = { 0,0,0,-1,0 };
451 451
      return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null);
452 452
      }
453 453
    else if( variant==1 )
454 454
      {
455 455
      int N = numL==2 ? 7:6;
456 456
      int E = numL==2 ? 3:1;
457
      float[][] bands     = new float[][] { {0.04f,35,SQ2/8,0.9f,N,E,E}, {0.000f,0,1,0.0f,3,0,0} };
458
      int[] bandIndices   = new int[] { 0,1,1,1,1 };
459
      float[][] corners   = new float[][] { {0.06f,0.15f} };
460
      int[] cornerIndices = new int[] { 0,0,0,0,0 };
461
      float[][] centers   = new float[][] { {0,0,-0.4f} };
462
      int[] centerIndices = new int[] { 0,0,0,0,-1 };
457
      float[][] bands     = { {0.04f,35,SQ2/8,0.9f,N,E,E}, {0.000f,0,1,0.0f,3,0,0} };
458
      int[] bandIndices   = { 0,1,1,1,1 };
459
      float[][] corners   = { {0.06f,0.15f} };
460
      int[] cornerIndices = { 0,0,0,0,0 };
461
      float[][] centers   = { {0,0,-0.4f} };
462
      int[] centerIndices = { 0,0,0,0,-1 };
463 463
      return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null);
464 464
      }
465 465
    else
466 466
      {
467 467
      int N = numL==2 ? 7:5;
468 468
      int E = numL==2 ? 5:2;
469
      float[][] bands     = new float[][] { {0.035f,30,0.16f,0.8f,N,2,E}, {0.020f,45,0.16f,0.2f,3,1,2} };
470
      int[] bandIndices   = new int[] { 0,0,1,1 };
471
      float[][] corners   = new float[][] { {0.07f,0.20f}, {0.02f,0.30f} };
472
      int[] cornerIndices = new int[] { 0,0,1,1 };
473
      float[][] centers   = new float[][] { {0.0f, -0.5f, -0.5f} };
474
      int[] centerIndices = new int[] { 0,0,0,0 };
469
      float[][] bands     = { {0.035f,30,0.16f,0.8f,N,2,E}, {0.020f,45,0.16f,0.2f,3,1,2} };
470
      int[] bandIndices   = { 0,0,1,1 };
471
      float[][] corners   = { {0.07f,0.20f}, {0.02f,0.30f} };
472
      int[] cornerIndices = { 0,0,1,1 };
473
      float[][] centers   = { {0.0f, -0.5f, -0.5f} };
474
      int[] centerIndices = { 0,0,0,0 };
475 475
      return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null);
476 476
      }
477 477
    }
src/main/java/org/distorted/objectlib/objects/TwistySquare1.java
75 75
    {
76 76
    if( variant==0 )
77 77
      {
78
      float[][] vertices = new float[][]
78
      float[][] vertices =
79 79
        {
80 80
         { -1.5f-X, 0.5f, 1.5f },
81 81
         {    0.0f, 0.5f, 1.5f },
......
87 87
         { -1.5f+X,-0.5f,-1.5f }
88 88
        };
89 89

  
90
      int[][] vert_indices = new int[][]
90
      int[][] indices =
91 91
        {
92 92
         {4,5,1,0},
93 93
         {5,6,2,1},
......
97 97
         {4,5,6,7}
98 98
        };
99 99

  
100
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),3);
100
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 3);
101 101
      }
102 102
    else if( variant==1 )
103 103
      {
104
      float[][] vertices = new float[][]
104
      float[][] vertices =
105 105
        {
106 106
         {  -X, 0.5f, 0.0f },
107 107
         {  +X, 0.5f, 0.0f },
......
111 111
         {0.0f,-0.5f,-1.5f },
112 112
        };
113 113

  
114
      int[][] vert_indices = new int[][]
114
      int[][] indices =
115 115
        {
116 116
         {0,1,2},
117 117
         {3,4,1,0},
......
120 120
         {5,3,0,2}
121 121
        };
122 122

  
123
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),2);
123
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 2);
124 124
      }
125 125
    else
126 126
      {
127
      float[][] vertices = new float[][]
127
      float[][] vertices =
128 128
        {
129 129
         { X-1.5f, 0.5f,  0.0f },
130 130
         {   0.0f, 0.5f,  0.0f },
......
135 135
         {   0.0f,-0.5f,X-1.5f },
136 136
         {  -1.5f,-0.5f, -1.5f }
137 137
        };
138
      int[][] vert_indices = new int[][]
138
      int[][] indices =
139 139
        {
140 140
         {0,1,2,3},
141 141
         {4,5,1,0},
......
145 145
         {4,5,6,7}
146 146
        };
147 147

  
148
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),3);
148
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 3);
149 149
      }
150 150
    }
151 151

  
......
161 161
      int[] cornerIndices = { 0,0,0,0,0,0,0,0 };
162 162
      float[][] centers   = { { -0.75f, 0.0f, 0.0f} };
163 163
      int[] centerIndices = { 0,0,0,0,0,0,0,0 };
164

  
165 164
      return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null);
166 165
      }
167 166
    else if( variant==1 )
......
172 171
      int[] cornerIndices = { 0,0,-1,0,0,-1 };
173 172
      float[][] centers   = { { 0.0f, 0.0f,-0.5f} };
174 173
      int[] centerIndices = { 0,0,-1,0,0,-1 };
175

  
176 174
      return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null);
177 175
      }
178 176
    else
......
183 181
      int[] cornerIndices = { 0,0,0,-1,0,0,0,-1 };
184 182
      float[][] centers   = { { -0.5f, 0.0f,-0.5f} };
185 183
      int[] centerIndices = { -1,0,-1,-1,-1,0,-1,-1 };
186

  
187 184
      return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null);
188 185
      }
189 186
    }
src/main/java/org/distorted/objectlib/objects/TwistySquare2.java
84 84
    {
85 85
    if( variant==0 )
86 86
      {
87
      float[][] vertices = new float[][]
87
      float[][] vertices =
88 88
        {
89 89
         { -1.5f-X, 0.5f, 1.5f },
90 90
         {    0.0f, 0.5f, 1.5f },
......
96 96
         { -1.5f+X,-0.5f,-1.5f }
97 97
        };
98 98

  
99
      int[][] vert_indices = new int[][]
99
      int[][] indices =
100 100
        {
101 101
         {4,5,1,0},
102 102
         {5,6,2,1},
......
106 106
         {4,5,6,7}
107 107
        };
108 108

  
109
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(), 3);
109
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 3);
110 110
      }
111 111
    else if( variant==1 )
112 112
      {
113
      float[][] vertices = new float[][]
113
      float[][] vertices =
114 114
        {
115 115
         {  -X, 0.5f, 0.0f },
116 116
         {  +X, 0.5f, 0.0f },
......
120 120
         {0.0f,-0.5f,-1.5f },
121 121
        };
122 122

  
123
      int[][] vert_indices = new int[][]
123
      int[][] indices =
124 124
        {
125 125
         {0,1,2},
126 126
         {3,4,1,0},
......
129 129
         {5,3,0,2}
130 130
        };
131 131

  
132
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),2);
132
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 2);
133 133
      }
134 134
    else
135 135
      {
136
      float[][] vertices = new float[][]
136
      float[][] vertices =
137 137
        {
138 138
         {-0.75f+X/2, 0.5f,  0.0f },
139 139
         { 0.75f-X/2, 0.5f,  0.0f },
......
142 142
         { 0.75f-X/2,-0.5f,  0.0f },
143 143
         {-0.75f-X/2,-0.5f, -1.5f }
144 144
        };
145
      int[][] vert_indices = new int[][]
145
      int[][] indices =
146 146
        {
147 147
         {0,1,2},
148 148
         {3,4,1,0},
......
151 151
         {5,3,0,2}
152 152
        };
153 153

  
154
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),2);
154
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 2);
155 155
      }
156 156
    }
157 157

  
src/main/java/org/distorted/objectlib/objects/TwistyTrajber.java
279 279
      final float A = SQ2*CUT*LEN;
280 280
      final float B =     CUT*LEN;
281 281

  
282
      float[][] vertices = new float[][]
282
      float[][] vertices =
283 283
          {
284 284
             {    0,    0,    0},
285 285
             {    B,    A,   -B},
......
297 297
             {  LEN-SQ2*A,   -A,      -LEN}
298 298
          };
299 299

  
300
      int[][] vert_indices = new int[][]
300
      int[][] indices =
301 301
          {
302 302
             {0,3,5,1},
303 303
             {0,2,6,3},
......
310 310
             {9,10,12,11}
311 311
          };
312 312

  
313
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),4);
313
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 4);
314 314
      }
315 315
    if( variant==1 )
316 316
      {
......
318 318
      final float B = LEN-2*LEN*CUT;
319 319
      final float C = (SQ2/2)*A;
320 320

  
321
      float[][] vertices = new float[][]
321
      float[][] vertices =
322 322
          {
323 323
             {    -B, 0,  0 },
324 324
             {  -B+C, A, -C },
......
330 330
             {     0,-A, -B },
331 331
          };
332 332

  
333
      int[][] vert_indices = new int[][]
333
      int[][] indices =
334 334
          {
335 335
             {0,3,4,1},
336 336
             {0,2,5,3},
......
340 340
             {3,5,7,6,4}
341 341
          };
342 342

  
343
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),2);
343
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 2);
344 344
      }
345 345
    else
346 346
      {
347 347
      final float L = LEN-3*LEN*CUT;
348 348

  
349
      float[][] vertices = new float[][]
349
      float[][] vertices =
350 350
          {
351 351
             { -L, -(SQ2/3)*L,   L/3 },
352 352
             {  L, -(SQ2/3)*L,   L/3 },
......
354 354
             {  0, -(SQ2/3)*L,-2*L/3 },
355 355
          };
356 356

  
357
      int[][] vert_indices = new int[][]
357
      int[][] indices =
358 358
          {
359 359
             {0,1,2},
360 360
             {0,1,3},
......
362 362
             {1,3,2},
363 363
          };
364 364

  
365
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),1);
365
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 1);
366 366
      }
367 367
    }
368 368

  
src/main/java/org/distorted/objectlib/objects/TwistyUltimate.java
123 123
    {
124 124
    if( variant==0 )
125 125
      {
126
      float[][] vertices = new float[][]
126
      float[][] vertices =
127 127
         {
128 128
           { 0     , 0     , 0      },
129 129
           { -E    , E+0.5f, -0.5f  },
......
134 134
           { -E    ,-E+0.5f, -0.5f  },
135 135
           {  E    ,-E+0.5f, -0.5f  }
136 136
         };
137
      int[][] vert_indices = new int[][]
137
      int[][] indices =
138 138
         {
139 139
           {6,0,5,1},
140 140
           {0,7,3,5},
......
144 144
           {4,1,6,2},
145 145
         };
146 146

  
147
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),3);
147
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 3);
148 148
      }
149 149
    else if( variant==1 )
150 150
      {
151
      float[][] vertices = new float[][]
151
      float[][] vertices =
152 152
         {
153 153
            {         0.00f,         0.00f,         0.00f},
154 154
            {       - 0.50f,-SQ5/4 - 0.25f,-SQ5/4 - 0.75f},
......
159 159
            {       - 0.50f,-SQ5/4 - 0.25f,-SQ5/4 + 0.25f},
160 160
            { SQ5/4 + 0.25f,-SQ5/4 + 0.25f,       + 0.50f}
161 161
         };
162
      int[][] vert_indices  = new int[][]
162
      int[][] indices =
163 163
         {
164 164
           {6,0,5,1},
165 165
           {0,7,3,5},
......
169 169
           {2,6,1,4},
170 170
         };
171 171

  
172
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),3);
172
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 3);
173 173
      }
174 174
    else
175 175
      {
176
      float[][] vertices = new float[][]
176
      float[][] vertices =
177 177
         {
178 178
           {  -E     ,-E+0.5f,     0.5f},
179 179
           {   E     , E-0.5f,    -0.5f},
......
187 187
           {     0.5f,-E-1.0f,  -E+0.5f},
188 188
           {  -E     ,-E-0.5f,-2*E-0.5f}
189 189
         };
190
      int[][] vert_indices = new int[][]
190
      int[][] indices =
191 191
         {
192
           {0,1,3,8,2},   // counterclockwise!
192
           {0,1,3,8,2},
193 193
           {0,4,9,5,1},
194 194
           { 0,2,6,4},
195 195
           { 1,5,7,3},
......
199 199
           {10,8,2,6}
200 200
         };
201 201

  
202
      return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),4);
202
      return new ObjectShape(vertices, indices, getNumCubitFaces(), 4);
203 203
      }
204 204
    }
205 205

  

Also available in: Unified diff