Project

General

Profile

« Previous | Next » 

Revision 4bd1b3d6

Added by Leszek Koltunski over 1 year ago

Corrections for Megamorphix.

View differences:

src/main/java/org/distorted/objectlib/main/ObjectType.java
84 84
  MIXU_3 ( TwistyMixup3x3.class      , 24, R.drawable.mixu_3, true, false, new InitData(new int[] {3,3,3})),
85 85

  
86 86
  MIXP_3 ( TwistyMixup3x3Plus.class  , 28, R.drawable.mixp_3, true , false, new InitData(new int[] {3,3,3})),
87
  MORP_4 ( TwistyMorphix.class       , 24, R.drawable.morp_2, true, false,  new InitData(new int[] {4,4,4})),
88 87
  MORP_3 ( TwistyMorphix.class       , 17, R.drawable.morp_2, true, false,  new InitData(new int[] {3,3,3})),
88
  MORP_4 ( TwistyMorphix.class       , 24, R.drawable.morp_2, true, false,  new InitData(new int[] {4,4,4})),
89 89

  
90 90
  CRA1_2 ( TwistyCrazy2x2.class      , 16, R.drawable.cra1_2, false, false, new InitData(new int[] {2,2,2})),
91 91
  CRA1_3 ( TwistyCrazy3x3.class      , 22, R.drawable.cra1_3, false, false, new InitData(new int[] {3,3,3}, TwistyCrazy3x3.CRAZY  )),
src/main/java/org/distorted/objectlib/main/TwistyObject.java
1295 1295
        }
1296 1296
      }
1297 1297

  
1298
    if( minError< 0.1f ) // TODO: 0.1 ?
1298
    if( minError< 0.05f ) // TODO: 0.05 ?
1299 1299
      {
1300 1300
      pos[offset  ] = mOrigPos[minErrorIndex1][3*minErrorIndex2  ];
1301 1301
      pos[offset+1] = mOrigPos[minErrorIndex1][3*minErrorIndex2+1];
src/main/java/org/distorted/objectlib/objects/TwistyMorphix.java
522 522
  public ObjectFaceShape getObjectFaceShape(int variant)
523 523
    {
524 524
    float height = isInIconMode() ? 0.001f : 0.03f;
525
    float internal = 0.02f;
525 526
    int numL = getNumLayers()[0];
526 527
    float DIST = numL==3 ? DIST3:DIST4;
527 528

  
......
529 530
      {
530 531
      float push1 = numL<=3 ? 0.07f : 0.06f;
531 532
      float push2 = numL<=3 ? 0.06f : 0.05f;
532
      float[][] bands   = { {height,30,0.15f,0.5f,5,1,2}, {0.001f,30,0.2f,0.4f,5,1,2} };
533
      float[][] bands   = { {height,30,0.15f,0.5f,5,1,2}, {internal,30,0.2f,0.4f,5,1,2} };
533 534
      int[] bandIndices = { 0,0,0,1,1,1 };
534 535
      float[][] corners = { {push1,0.025f}, {push2,0.020f} };
535 536
      int[] indices     = { 0,0,0,0,-1 };
......
541 542
      final float C = numL==2 ? 1.0f : numL*(3*DIST-1);
542 543
      final float Y = (SQ2/2)*C;
543 544
      final float Z = 0.5f*C;
544
      float[][] bands   = { {height,30,0.15f,0.5f,5,1,1}, {0.001f,30,0.25f,0.5f,5,1,1} };
545
      float[][] bands   = { {height,30,0.15f,0.5f,5,1,1}, {internal,30,0.25f,0.5f,5,1,1} };
545 546
      int[] bandIndices = { 0,1,1,1 };
546 547
      float[][] corners = { {0.08f,0.013f} };
547
      int[] indices     = { 0,0,0,-1 };
548
      int[] indices     = { -1,-1,-1,-1 };
548 549
      float[][] centers = { { 0.0f,-Y/3,-2*Z/3 } };
549 550
      return new ObjectFaceShape(bands,bandIndices,corners,indices,centers,indices,null);
550 551
      }
551 552
    else if( variant==2 )
552 553
      {
553
      float[][] bands   = { {height,30,0.15f,0.5f,5,1,1}, {0.001f,30,0.25f,0.5f,5,1,1} };
554
      float[][] bands   = { {height,30,0.15f,0.5f,5,1,1}, {internal,30,0.25f,0.5f,5,1,1} };
554 555
      int[] bandIndices = { 0,0,1,1,1,1,1 };
555 556
      float[][] corners = { {0.07f,0.013f} };
556 557
      int[] indices     = { 0,0,-1,-1,-1,-1,-1,-1 };
......
559 560
      }
560 561
    else if( variant==3 || variant==4 )
561 562
      {
563
      int c = variant==3 ? 0 : -1;
562 564
      final float Y = (SQ2/4)*numL*(1-2*DIST)/(numL-2);
563
      float[][] bands   = { {height,30,0.15f,0.5f,5,0,0}, {0.001f,30,0.25f,0.5f,5,0,0} };
565
      float[][] bands   = { {height,30,0.15f,0.5f,5,0,0}, {internal,30,0.25f,0.5f,5,0,0} };
564 566
      int[] bandIndices = { 0,1,1,1,1 };
565 567
      float[][] corners = { {0.05f,0.023f} };
566
      int[] indices     = { 0,0,-1,0,0,-1, };
568
      int[] indices     = { -1,-1,-1,c,c,-1, };
567 569
      float[][] centers = { { 0.0f,-Y,0.0f } };
568 570
      return new ObjectFaceShape(bands,bandIndices,corners,indices,centers,indices,null);
569 571
      }
570 572
    else
571 573
      {
572 574
      final float Z = numL*(1-2*DIST)/(2*numL-4);
573
      float[][] bands   = { {height,30,0.15f,0.5f,5,0,0}, {0.001f,30,0.25f,0.5f,3,0,0} };
575
      float[][] bands   = { {height,30,0.15f,0.5f,5,0,0}, {internal,30,0.25f,0.5f,3,0,0} };
574 576
      int[] bandIndices = { 0,1,1,1,1,1 };
575 577
      float[][] corners = { {0.02f,0.023f} };
576 578
      int[] indices     = { 0,0,0,0,-1,-1,-1,-1 };

Also available in: Unified diff