Project

General

Profile

« Previous | Next » 

Revision 66de0d91

Added by Leszek Koltunski over 2 years ago

Make the Master Kilominx' and Gigaminx' meshes much smaller.

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyKilominx.java
315 315
    int[] numLayers = getNumLayers();
316 316
    int numVariants = getNumCubitVariants(numLayers);
317 317
    int numL        = numLayers[0];
318
    boolean small   = numL<=3;
318 319

  
319
    if( variant==0 && numL>3 )
320
    if( variant==0 && !small )
320 321
      {
321 322
      float width = numL/(numL-1.0f);
322 323
      float A = (2*SQ3/3)*SIN54;
......
349 350

  
350 351
      float[][] bands     = new float[][]
351 352
        {
352
         {0.04f,34,0.3f,0.2f, 3, 1, 0},
353
         {0.00f, 0,0.0f,0.0f, 2, 1, 0}
353
         {0.04f,34,0.3f,0.2f, 3, 0, 0},
354
         {0.00f,34,0.0f,0.0f, 2, 0, 0}
354 355
        };
355 356

  
356 357
      int[] bandIndices   = new int[] { 0,0,0,1,1,1};
......
412 413
          }
413 414
        }
414 415

  
415
      int numBands0 = numL<=5 ? 4 : 3;
416
      int numBands1 = numL<=5 ? 3 : 2;
416
      int E  = small ? 1 : 0;
417
      int N0 = small ? 4 : 3;
418
      int N1 = small ? 3 : 2;
417 419

  
418 420
      float[][] bands = new float[][]
419 421
        {
420
         {0.04f,34,0.2f,0.2f,numBands0,1,1},
421
         {0.00f, 0,0.0f,0.0f,numBands1,0,0}
422
         {0.04f,34,0.2f,0.2f,N0,E,E},
423
         {0.00f,34,0.0f,0.0f,N1,0,0}
422 424
        };
423 425

  
424 426
      int[] bandIndices   = new int[] { 0,0,1,1,1,1};
......
441 443
      double X3= H*SIN_HALFD;
442 444
      double Z3= H*COS_HALFD;
443 445
      double C = 1/(COS54*Math.sqrt(2-2*SIN18));
444
      int N = numL==3 ? 4 : 3;
445
      int E = numL==3 ? 1 : 0;
446
      int N = small ? 4 : 3;
447
      int E = small ? 1 : 0;
446 448

  
447 449
      double[][] vertices = new double[][]
448 450
        {
......
468 470

  
469 471
      float[][] bands = new float[][]
470 472
        {
471
         {0.04f,17,0.3f,0.2f,N,1,E},
472
         {0.00f,17,0.3f,0.2f,N,1,E}
473
         {0.04f,17,0.3f,0.2f,N,E,E},
474
         {0.00f,17,0.3f,0.2f,N,E,E}
473 475
        };
474 476

  
475 477
      float A = (2*SQ3/3)*SIN54;

Also available in: Unified diff