Project

General

Profile

Download (20.9 KB) Statistics
| Branch: | Tag: | Revision:

magiccube / src / main / java / org / distorted / objects / TwistySkewb.java @ 588ace55

1
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2020 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6
// Magic Cube is free software: you can redistribute it and/or modify                            //
7
// it under the terms of the GNU General Public License as published by                          //
8
// the Free Software Foundation, either version 2 of the License, or                             //
9
// (at your option) any later version.                                                           //
10
//                                                                                               //
11
// Magic Cube is distributed in the hope that it will be useful,                                 //
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
14
// GNU General Public License for more details.                                                  //
15
//                                                                                               //
16
// You should have received a copy of the GNU General Public License                             //
17
// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19

    
20
package org.distorted.objects;
21

    
22
import static org.distorted.objectlib.Movement.TYPE_SPLIT_CORNER;
23

    
24
import android.content.res.Resources;
25

    
26
import org.distorted.objectlib.ObjectShape;
27
import org.distorted.objectlib.ObjectSticker;
28
import org.distorted.objectlib.ScrambleState;
29
import org.distorted.library.main.DistortedEffects;
30
import org.distorted.library.main.DistortedTexture;
31
import org.distorted.library.mesh.MeshSquare;
32
import org.distorted.library.type.Static3D;
33
import org.distorted.library.type.Static4D;
34
import org.distorted.main.R;
35
import org.distorted.objectlib.Movement;
36
import org.distorted.objectlib.Movement6;
37
import org.distorted.objectlib.ObjectList;
38
import org.distorted.objectlib.Twisty6;
39

    
40
///////////////////////////////////////////////////////////////////////////////////////////////////
41

    
42
public class TwistySkewb extends Twisty6
43
{
44
  static final Static3D[] ROT_AXIS = new Static3D[]
45
         {
46
           new Static3D(+SQ3/3,+SQ3/3,+SQ3/3),
47
           new Static3D(+SQ3/3,+SQ3/3,-SQ3/3),
48
           new Static3D(+SQ3/3,-SQ3/3,+SQ3/3),
49
           new Static3D(+SQ3/3,-SQ3/3,-SQ3/3)
50
         };
51

    
52
  private static final int[][][] ENABLED = new int[][][]
53
      {
54
          {{0,1},{3,1},{2,3},{0,2}},
55
          {{2,3},{3,1},{0,1},{0,2}},
56
          {{1,2},{0,1},{0,3},{2,3}},
57
          {{1,2},{2,3},{0,3},{0,1}},
58
          {{0,3},{0,2},{1,2},{1,3}},
59
          {{1,2},{0,2},{0,3},{1,3}},
60
      };
61

    
62
  private ScrambleState[] mStates;
63
  private int[] mBasicAngle;
64
  private Static4D[] mQuats;
65
  private float[][] mCuts;
66
  private boolean[][] mLayerRotatable;
67
  private int[][] mCornerMap,mEdgeMap,mCenterMap;
68
  private ObjectSticker[] mStickers;
69
  private Movement mMovement;
70

    
71
///////////////////////////////////////////////////////////////////////////////////////////////////
72

    
73
  public TwistySkewb(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
74
                     DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
75
    {
76
    super(size, 2*size-2, quat, texture, mesh, effects, moves, ObjectList.SKEW, res, scrWidth);
77
    }
78

    
79
///////////////////////////////////////////////////////////////////////////////////////////////////
80

    
81
  protected ScrambleState[] getScrambleStates()
82
    {
83
    if( mStates==null )
84
      {
85
      int size = getNumLayers();
86
      int[] tmp = {0,-1,0, 0,1,0, size-1,-1,0, size-1,1,0 };
87

    
88
      mStates = new ScrambleState[]
89
        {
90
        new ScrambleState( new int[][] {tmp,tmp,tmp,tmp} )
91
        };
92
      }
93

    
94
    return mStates;
95
    }
96

    
97
///////////////////////////////////////////////////////////////////////////////////////////////////
98

    
99
  private void initializeQuats()
100
    {
101
    mQuats = new Static4D[]
102
         {
103
         new Static4D(  0.0f,  0.0f,  0.0f,  1.0f ),
104
         new Static4D(  1.0f,  0.0f,  0.0f,  0.0f ),
105
         new Static4D(  0.0f,  1.0f,  0.0f,  0.0f ),
106
         new Static4D(  0.0f,  0.0f,  1.0f,  0.0f ),
107

    
108
         new Static4D(  0.5f,  0.5f,  0.5f,  0.5f ),
109
         new Static4D(  0.5f,  0.5f,  0.5f, -0.5f ),
110
         new Static4D(  0.5f,  0.5f, -0.5f,  0.5f ),
111
         new Static4D(  0.5f,  0.5f, -0.5f, -0.5f ),
112
         new Static4D(  0.5f, -0.5f,  0.5f,  0.5f ),
113
         new Static4D(  0.5f, -0.5f,  0.5f, -0.5f ),
114
         new Static4D(  0.5f, -0.5f, -0.5f,  0.5f ),
115
         new Static4D(  0.5f, -0.5f, -0.5f, -0.5f )
116
         };
117
    }
118

    
119
///////////////////////////////////////////////////////////////////////////////////////////////////
120

    
121
  protected int[] getSolvedQuats(int cubit, int numLayers)
122
    {
123
    if( mQuats==null ) initializeQuats();
124
    int status = retCubitSolvedStatus(cubit,numLayers);
125
    return status<0 ? null : buildSolvedQuats(Movement6.FACE_AXIS[status],mQuats);
126
    }
127

    
128
///////////////////////////////////////////////////////////////////////////////////////////////////
129

    
130
  private int getNumCorners()
131
    {
132
    return 8;
133
    }
134

    
135
///////////////////////////////////////////////////////////////////////////////////////////////////
136

    
137
  private int getNumEdges(int layers)
138
    {
139
    return (layers-2)*12;
140
    }
141

    
142
///////////////////////////////////////////////////////////////////////////////////////////////////
143

    
144
  private int getNumCentersPerFace(int layers)
145
    {
146
    return ((layers-2)*(layers-2) + (layers-1)*(layers-1));
147
    }
148

    
149
///////////////////////////////////////////////////////////////////////////////////////////////////
150

    
151
  protected Static4D[] getQuats()
152
    {
153
    if( mQuats==null ) initializeQuats();
154
    return mQuats;
155
    }
156

    
157
///////////////////////////////////////////////////////////////////////////////////////////////////
158

    
159
  protected int getSolvedFunctionIndex()
160
    {
161
    return 0;
162
    }
163

    
164
///////////////////////////////////////////////////////////////////////////////////////////////////
165

    
166
  protected int getNumStickerTypes(int numLayers)
167
    {
168
    return 3;
169
    }
170

    
171
///////////////////////////////////////////////////////////////////////////////////////////////////
172

    
173
  protected float[][] getCuts(int numLayers)
174
    {
175
    if( mCuts==null )
176
      {
177
      float[] c = numLayers==2 ? (new float[] {0.0f}) : (new float[] {-SQ3/6,+SQ3/6});
178
      mCuts = new float[][] {c,c,c,c};
179
      }
180

    
181
    return mCuts;
182
    }
183

    
184
///////////////////////////////////////////////////////////////////////////////////////////////////
185

    
186
  private void getLayerRotatable(int numLayers)
187
    {
188
    if( mLayerRotatable==null )
189
      {
190
      int numAxis = ROT_AXIS.length;
191
      boolean[] tmp = numLayers==2 ? (new boolean[] {true,true}) : (new boolean[] {true,false,true});
192
      mLayerRotatable = new boolean[numAxis][];
193
      for(int i=0; i<numAxis; i++) mLayerRotatable[i] = tmp;
194
      }
195
    }
196

    
197
///////////////////////////////////////////////////////////////////////////////////////////////////
198

    
199
  protected int getNumCubitFaces()
200
    {
201
    return 6;
202
    }
203

    
204
///////////////////////////////////////////////////////////////////////////////////////////////////
205

    
206
  protected float[][] getCubitPositions(int numLayers)
207
    {
208
    final float DIST_CORNER = numLayers-1;
209
    final float DIST_EDGE   = numLayers-1;
210
    final float DIST_CENTER = numLayers-1;
211

    
212
    final int numCorners = getNumCorners();
213
    final int numEdges   = getNumEdges(numLayers);
214
    final int numCenters = 6*getNumCentersPerFace(numLayers);
215

    
216
    final float[][] CENTERS = new float[numCorners+numEdges+numCenters][];
217

    
218
    /// CORNERS //////////////////////////////////////////////
219

    
220
    CENTERS[0] = new float[] { DIST_CORNER, DIST_CORNER, DIST_CORNER };
221
    CENTERS[1] = new float[] { DIST_CORNER, DIST_CORNER,-DIST_CORNER };
222
    CENTERS[2] = new float[] { DIST_CORNER,-DIST_CORNER, DIST_CORNER };
223
    CENTERS[3] = new float[] { DIST_CORNER,-DIST_CORNER,-DIST_CORNER };
224
    CENTERS[4] = new float[] {-DIST_CORNER, DIST_CORNER, DIST_CORNER };
225
    CENTERS[5] = new float[] {-DIST_CORNER, DIST_CORNER,-DIST_CORNER };
226
    CENTERS[6] = new float[] {-DIST_CORNER,-DIST_CORNER, DIST_CORNER };
227
    CENTERS[7] = new float[] {-DIST_CORNER,-DIST_CORNER,-DIST_CORNER };
228

    
229
    /// EDGES ///////////////////////////////////////////////
230

    
231
    final float[][]  edgeTable =
232
        {
233
            {0,+DIST_EDGE,+DIST_EDGE},
234
            {+DIST_EDGE,0,+DIST_EDGE},
235
            {0,-DIST_EDGE,+DIST_EDGE},
236
            {-DIST_EDGE,0,+DIST_EDGE},
237
            {+DIST_EDGE,+DIST_EDGE,0},
238
            {+DIST_EDGE,-DIST_EDGE,0},
239
            {-DIST_EDGE,-DIST_EDGE,0},
240
            {-DIST_EDGE,+DIST_EDGE,0},
241
            {0,+DIST_EDGE,-DIST_EDGE},
242
            {+DIST_EDGE,0,-DIST_EDGE},
243
            {0,-DIST_EDGE,-DIST_EDGE},
244
            {-DIST_EDGE,0,-DIST_EDGE}
245
        };
246

    
247
    int index=8;
248

    
249
    for (float[] edges : edgeTable)
250
      {
251
      float c = 3-numLayers;
252

    
253
      for (int j=0; j<numLayers-2; j++, c+=2, index++)
254
        {
255
        CENTERS[index] = new float[] { edges[0]==0 ? c : edges[0] ,
256
                                       edges[1]==0 ? c : edges[1] ,
257
                                       edges[2]==0 ? c : edges[2] };
258
        }
259
      }
260

    
261
    /// CENTERS //////////////////////////////////////////////
262

    
263
    final float X= -1000.0f;
264
    final float Y= -1001.0f;
265

    
266
    final float[][]  centerTable =
267
        {
268
            {+DIST_CENTER,X,Y},
269
            {-DIST_CENTER,X,Y},
270
            {X,+DIST_CENTER,Y},
271
            {X,-DIST_CENTER,Y},
272
            {X,Y,+DIST_CENTER},
273
            {X,Y,-DIST_CENTER}
274
        };
275

    
276
    float x,y, cen0, cen1, cen2;
277

    
278
    for( float[] centers : centerTable )
279
      {
280
      x = 2-numLayers;
281

    
282
      for(int i=0; i<numLayers-1; i++, x+=2)
283
        {
284
        y = 2-numLayers;
285

    
286
        for(int j=0; j<numLayers-1; j++, y+=2, index++)
287
          {
288
               if( centers[0]==Y ) cen0 = y;
289
          else if( centers[0]==X ) cen0 = x;
290
          else                     cen0 = centers[0];
291

    
292
               if( centers[1]==Y ) cen1 = y;
293
          else if( centers[1]==X ) cen1 = x;
294
          else                     cen1 = centers[1];
295

    
296
               if( centers[2]==Y ) cen2 = y;
297
          else if( centers[2]==X ) cen2 = x;
298
          else                     cen2 = centers[2];
299

    
300
          CENTERS[index] = new float[] {cen0,cen1,cen2};
301
          }
302
        }
303

    
304
      x = 3-numLayers;
305

    
306
      for(int i=0; i<numLayers-2; i++, x+=2)
307
        {
308
        y = 3-numLayers;
309

    
310
        for(int j=0; j<numLayers-2; j++, y+=2, index++)
311
          {
312
               if( centers[0]==Y ) cen0 = y;
313
          else if( centers[0]==X ) cen0 = x;
314
          else                     cen0 = centers[0];
315

    
316
               if( centers[1]==Y ) cen1 = y;
317
          else if( centers[1]==X ) cen1 = x;
318
          else                     cen1 = centers[1];
319

    
320
               if( centers[2]==Y ) cen2 = y;
321
          else if( centers[2]==X ) cen2 = x;
322
          else                     cen2 = centers[2];
323

    
324
          CENTERS[index] = new float[] {cen0,cen1,cen2};
325
          }
326
        }
327
      }
328

    
329
    return CENTERS;
330
    }
331

    
332
///////////////////////////////////////////////////////////////////////////////////////////////////
333

    
334
  protected Static4D getQuat(int cubit, int numLayers)
335
    {
336
    if( mQuats==null ) initializeQuats();
337
    int numCorners = getNumCorners();
338
    int numEdges   = getNumEdges(numLayers);
339

    
340
    if( cubit<numCorners )
341
      {
342
      switch(cubit)
343
        {
344
        case  0: return mQuats[0];                         //  unit quat
345
        case  1: return new Static4D( SQ2/2,0,0,SQ2/2);    //  90 along X
346
        case  2: return new Static4D(-SQ2/2,0,0,SQ2/2);    // -90 along X
347
        case  3: return mQuats[1];                         // 180 along X
348
        case  4: return new Static4D(0, SQ2/2,0,SQ2/2);    //  90 along Y
349
        case  5: return mQuats[2];                         // 180 along Y
350
        case  6: return mQuats[3];                         // 180 along Z
351
        case  7: return new Static4D(SQ2/2,0,-SQ2/2,0);    // 180 along (SQ2/2,0,-SQ2/2)
352
        }
353
      }
354
    else if( cubit<numCorners+numEdges )
355
      {
356
      int edge = (cubit-numCorners)/(numLayers-2);
357

    
358
      switch(edge)
359
        {
360
        case  0: return mQuats[ 0];
361
        case  1: return mQuats[ 5];
362
        case  2: return mQuats[ 3];
363
        case  3: return mQuats[11];
364
        case  4: return mQuats[ 4];
365
        case  5: return mQuats[ 7];
366
        case  6: return mQuats[ 9];
367
        case  7: return mQuats[10];
368
        case  8: return mQuats[ 2];
369
        case  9: return mQuats[ 8];
370
        case 10: return mQuats[ 1];
371
        case 11: return mQuats[ 6];
372
        }
373
      }
374
    else
375
      {
376
      int center = (cubit-numCorners-numEdges)/getNumCentersPerFace(numLayers);
377

    
378
      switch(center)
379
        {
380
        case 0: return new Static4D(0,-SQ2/2,0,SQ2/2);    // -90 along Y
381
        case 1: return new Static4D(0, SQ2/2,0,SQ2/2);    //  90 along Y
382
        case 2: return new Static4D( SQ2/2,0,0,SQ2/2);    //  90 along X
383
        case 3: return new Static4D(-SQ2/2,0,0,SQ2/2);    // -90 along X
384
        case 4: return mQuats[0];                         //  unit quaternion
385
        case 5: return mQuats[1];                         // 180 along X
386
        }
387
      }
388

    
389
    return null;
390
    }
391

    
392
///////////////////////////////////////////////////////////////////////////////////////////////////
393

    
394
  protected ObjectShape getObjectShape(int cubit, int numLayers)
395
    {
396
    int variant = getCubitVariant(cubit,numLayers);
397

    
398
    if( variant==0 )
399
      {
400
      double[][] vertices = new double[][] { {-1,0,0},{0,-1,0},{0,0,-1},{-1,-1,-1},{0,0,0} };
401
      int[][] vert_indices = new int[][] { {0,1,4},{2,0,4},{1,2,4},{3,1,0},{3,2,1},{3,0,2} };
402
      int N = numLayers==2 ? 7:5;
403
      int E1= numLayers==2 ? 3:2;
404
      int E2= numLayers==2 ? 5:3;
405
      float[][] bands     = new float[][] { {0.020f,35,0.16f,0.7f,N,E1,E1}, {0.000f, 0,1.00f,0.0f,3,1,E2} };
406
      int[] bandIndices   = new int[] { 0,0,0,1,1,1 };
407
      float[][] corners   = new float[][] { {0.05f,0.25f}, {0.05f,0.20f} };
408
      int[] cornerIndices = new int[] { 1,1,1,0,0 };
409
      float[][] centers   = new float[][] { {-0.5f, -0.5f, -0.5f} };
410
      int[] centerIndices = new int[] { 0,0,0,-1,0 };
411
      return new ObjectShape(vertices,vert_indices,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null);
412
      }
413
    else if( variant==1 )
414
      {
415
      double[][] vertices = new double[][] { {-1,0,0},{1,0,0},{0,-1,0},{0,0,-1} };
416
      int[][] vert_indices = new int[][] { {2,1,0},{3,0,1},{2,3,1},{3,2,0} };
417
      int N = numLayers==2 ? 7:5;
418
      int E = numLayers==2 ? 5:2;
419
      float[][] bands     = new float[][] { {0.035f,30,0.16f,0.8f,N,2,E}, {0.020f,45,0.16f,0.2f,3,1,2} };
420
      int[] bandIndices   = new int[] { 0,0,1,1 };
421
      float[][] corners   = new float[][] { {0.07f,0.20f}, {0.02f,0.30f} };
422
      int[] cornerIndices = new int[] { 0,0,1,1 };
423
      float[][] centers   = new float[][] { {0.0f, -0.5f, -0.5f} };
424
      int[] centerIndices = new int[] { 0,0,0,0 };
425
      return new ObjectShape(vertices,vert_indices,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null);
426
      }
427
    else
428
      {
429
      double[][] vertices = new double[][] { {-1,0,0},{0,-1,0},{1,0,0},{0,1,0},{0,0,-1} };
430
      int[][] vert_indices = new int[][] { {0,1,2,3},{4,1,0},{4,2,1},{4,3,2},{4,0,3} };
431
      int N = numLayers==2 ? 7:6;
432
      int E = numLayers==2 ? 3:1;
433
      float[][] bands     = new float[][] { {0.04f,35,SQ2/8,0.9f,N,E,E}, {0.000f,0,1,0.0f,3,0,0} };
434
      int[] bandIndices   = new int[] { 0,1,1,1,1 };
435
      float[][] corners   = new float[][] { {0.06f,0.15f} };
436
      int[] cornerIndices = new int[] { 0,0,0,0,0 };
437
      float[][] centers   = new float[][] { {0,0,-0.4f} };
438
      int[] centerIndices = new int[] { 0,0,0,0,-1 };
439
      return new ObjectShape(vertices,vert_indices,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null);
440
      }
441
    }
442

    
443
///////////////////////////////////////////////////////////////////////////////////////////////////
444

    
445
  protected int getNumCubitVariants(int numLayers)
446
    {
447
    return 3;
448
    }
449

    
450
///////////////////////////////////////////////////////////////////////////////////////////////////
451

    
452
  protected int getCubitVariant(int cubit, int numLayers)
453
    {
454
    int numCorners = getNumCorners();
455
    if( cubit<numCorners ) return 0;
456
    int numEdges = getNumEdges(numLayers);
457
    return cubit<numCorners+numEdges ? 1:2;
458
    }
459

    
460
///////////////////////////////////////////////////////////////////////////////////////////////////
461

    
462
  protected int getFaceColor(int cubit, int cubitface, int numLayers)
463
    {
464
    if( mCornerMap==null || mEdgeMap==null || mCenterMap==null )
465
      {
466
      mCornerMap = new int[][]
467
         {
468
           {  4, 2, 0, 18,18,18 },
469
           {  2, 5, 0, 18,18,18 },
470
           {  3, 4, 0, 18,18,18 },
471
           {  5, 3, 0, 18,18,18 },
472
           {  1, 2, 4, 18,18,18 },
473
           {  5, 2, 1, 18,18,18 },
474
           {  4, 3, 1, 18,18,18 },
475
           {  1, 3, 5, 18,18,18 },
476
         };
477

    
478
      mEdgeMap = new int[][]
479
         {
480
           { 10, 8, 18,18,18,18 },
481
           {  6,10, 18,18,18,18 },
482
           { 10, 9, 18,18,18,18 },
483
           {  7,10, 18,18,18,18 },
484
           {  8, 6, 18,18,18,18 },
485
           {  9, 6, 18,18,18,18 },
486
           {  9, 7, 18,18,18,18 },
487
           {  8, 7, 18,18,18,18 },
488
           { 11, 8, 18,18,18,18 },
489
           {  6,11, 18,18,18,18 },
490
           { 11, 9, 18,18,18,18 },
491
           {  7,11, 18,18,18,18 }
492
         };
493

    
494
      mCenterMap = new int[][]
495
         {
496
           { 12, 18,18,18,18,18 },
497
           { 13, 18,18,18,18,18 },
498
           { 14, 18,18,18,18,18 },
499
           { 15, 18,18,18,18,18 },
500
           { 16, 18,18,18,18,18 },
501
           { 17, 18,18,18,18,18 },
502
         };
503
      }
504

    
505
    int numCorners = getNumCorners();
506
    int numEdges   = getNumEdges(numLayers);
507

    
508
    if( cubit<numCorners )
509
      {
510
      return mCornerMap[cubit][cubitface];
511
      }
512
    else if( cubit<numCorners+numEdges )
513
      {
514
      int edge = (cubit-numCorners)/(numLayers-2);
515
      return mEdgeMap[edge][cubitface];
516
      }
517
    else
518
      {
519
      int center = (cubit-numCorners-numEdges)/getNumCentersPerFace(numLayers);
520
      return mCenterMap[center][cubitface];
521
      }
522
    }
523

    
524
///////////////////////////////////////////////////////////////////////////////////////////////////
525

    
526
  protected ObjectSticker retSticker(int face)
527
    {
528
    if( mStickers==null )
529
      {
530
      float[][] STICKERS = new float[][]
531
          {
532
             { -0.5f, 0.25f, 0.25f,  -0.5f, 0.25f, 0.25f  },
533
             { -0.5f, 0.00f, 0.00f,  -0.5f, 0.50f, 0.0f, 0.0f, 0.5f }
534
          };
535

    
536
      final float R1 = 0.025f;
537
      final float R2 = 0.025f;
538
      final float R3 = 0.055f;
539
      final float[][] radii  = { { R1,R1,R1 },{ R2,R2,R2 },{ R3,R3,R3,R3 } };
540
      final float[] strokes = { 0.045f, 0.035f, 0.035f };
541

    
542
      mStickers = new ObjectSticker[STICKERS.length+1];
543

    
544
      for(int s=0; s<STICKERS.length+1; s++)
545
        {
546
        int index = s<2 ? 0:1;
547
        mStickers[s] = new ObjectSticker(STICKERS[index],null,radii[s],strokes[s]);
548
        }
549
      }
550

    
551
    return mStickers[face/NUM_FACE_COLORS];
552
    }
553

    
554
///////////////////////////////////////////////////////////////////////////////////////////////////
555
// PUBLIC API
556

    
557
  public Static3D[] getRotationAxis()
558
    {
559
    return ROT_AXIS;
560
    }
561

    
562
///////////////////////////////////////////////////////////////////////////////////////////////////
563

    
564
  public Movement getMovement()
565
    {
566
    if( mMovement==null )
567
      {
568
      int numLayers = getNumLayers();
569
      if( mCuts==null ) getCuts(numLayers);
570
      getLayerRotatable(numLayers);
571
      mMovement = new Movement6(ROT_AXIS,mCuts,mLayerRotatable,2*numLayers-2,TYPE_SPLIT_CORNER,ENABLED);
572
      }
573
    return mMovement;
574
    }
575

    
576
///////////////////////////////////////////////////////////////////////////////////////////////////
577

    
578
  public int[] getBasicAngle()
579
    {
580
    if( mBasicAngle ==null ) mBasicAngle = new int[] { 3,3,3,3 };
581
    return mBasicAngle;
582
    }
583

    
584
///////////////////////////////////////////////////////////////////////////////////////////////////
585

    
586
  public int getObjectName(int numLayers)
587
    {
588
    switch(numLayers)
589
      {
590
      case 2: return R.string.skew2;
591
      case 3: return R.string.skew3;
592
      }
593
    return R.string.skew2;
594
    }
595

    
596
///////////////////////////////////////////////////////////////////////////////////////////////////
597

    
598
  public int getInventor(int numLayers)
599
    {
600
    switch(numLayers)
601
      {
602
      case 2: return R.string.skew2_inventor;
603
      case 3: return R.string.skew3_inventor;
604
      }
605
    return R.string.skew2_inventor;
606
    }
607

    
608
///////////////////////////////////////////////////////////////////////////////////////////////////
609

    
610
  public int getComplexity(int numLayers)
611
    {
612
    switch(numLayers)
613
      {
614
      case 2: return 4;
615
      case 3: return 8;
616
      }
617
    return 5;
618
    }
619
}
(21-21/25)