Project

General

Profile

« Previous | Next » 

Revision be56193c

Added by Leszek Koltunski about 3 years ago

Move all the special cubit-creating code out of FactoryCubit and to the Object classes, and thus hopefully finish implementing the new cubit creating engine.

View differences:

src/main/java/org/distorted/objects/TwistySkewb.java
167 167
             {4,0,3}
168 168
          };
169 169

  
170

  
171 170
  private static final float[][] STICKERS = new float[][]
172 171
          {
173
             { -0.5f,   0.25f, 0.25f,  -0.5f, 0.25f, 0.25f  },
174
             {  0.0f, -1.0f/3, 0.50f, 1.0f/6, -0.5f, 1.0f/6 },
175
             { -0.5f,    0.0f, 0.00f,  -0.5f, 0.50f, 0.0f, 0.0f, 0.5f }
172
             { -0.5f, 0.25f, 0.25f,  -0.5f, 0.25f, 0.25f  },
173
             { -0.5f, 0.00f, 0.00f,  -0.5f, 0.50f, 0.0f, 0.0f, 0.5f }
176 174
          };
177 175

  
178 176
  private static MeshBase[] mMeshes;
......
583 581
    {
584 582
    int COLORS = FACE_COLORS.length;
585 583
    float R=0.0f,S=0.0f;
586
    int cubitType = face/COLORS;
584
    int index=0, cubitType = face/COLORS;
587 585

  
588 586
    switch(cubitType)
589 587
      {
590
      case 0: R = 0.025f; S = 0.045f; break;
591
      case 1: R = 0.025f; S = 0.035f; break;
592
      case 2: R = 0.055f; S = 0.035f; break;
588
      case 0: R = 0.025f; S = 0.045f; index= 0; break;
589
      case 1: R = 0.025f; S = 0.035f; index= 0; break;
590
      case 2: R = 0.055f; S = 0.035f; index= 1; break;
593 591
      }
594 592

  
595 593
    FactorySticker factory = FactorySticker.getInstance();
596
    factory.drawRoundedPolygon(canvas, paint, left, top, STICKERS[cubitType], S, FACE_COLORS[face%COLORS], R);
594
    factory.drawRoundedPolygon(canvas, paint, left, top, STICKERS[index], S, FACE_COLORS[face%COLORS], R);
597 595
    }
598 596

  
599 597
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff