Project

General

Profile

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

magiccube / src / main / java / org / distorted / objects / TwistySkewb.java @ e9a87113

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 android.content.res.Resources;
23

    
24
import org.distorted.helpers.ObjectShape;
25
import org.distorted.helpers.ObjectSticker;
26
import org.distorted.helpers.ScrambleState;
27
import org.distorted.library.main.DistortedEffects;
28
import org.distorted.library.main.DistortedTexture;
29
import org.distorted.library.mesh.MeshSquare;
30
import org.distorted.library.type.Static3D;
31
import org.distorted.library.type.Static4D;
32
import org.distorted.main.R;
33

    
34
///////////////////////////////////////////////////////////////////////////////////////////////////
35

    
36
public class TwistySkewb extends TwistyObject
37
{
38
  // the four rotation axis of a RubikSkewb. Must be normalized.
39
  static final Static3D[] ROT_AXIS = new Static3D[]
40
         {
41
           new Static3D(+SQ3/3,+SQ3/3,+SQ3/3),
42
           new Static3D(+SQ3/3,+SQ3/3,-SQ3/3),
43
           new Static3D(+SQ3/3,-SQ3/3,+SQ3/3),
44
           new Static3D(+SQ3/3,-SQ3/3,-SQ3/3)
45
         };
46

    
47
  private static final int[] FACE_COLORS = new int[]
48
         {
49
           COLOR_YELLOW, COLOR_WHITE,
50
           COLOR_BLUE  , COLOR_GREEN,
51
           COLOR_RED   , COLOR_ORANGE
52
         };
53

    
54
  private ScrambleState[] mStates;
55
  private int[] mBasicAngle;
56
  private Static4D[] mQuats;
57
  private int[][] mCornerMap,mEdgeMap,mCenterMap;
58
  private ObjectSticker[] mStickers;
59
  private Movement mMovement;
60

    
61
///////////////////////////////////////////////////////////////////////////////////////////////////
62

    
63
  TwistySkewb(int size, Static4D quat, DistortedTexture texture,
64
              MeshSquare mesh, DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
65
    {
66
    super(size, 2*size-2, quat, texture, mesh, effects, moves, ObjectList.SKEW, res, scrWidth);
67
    }
68

    
69
///////////////////////////////////////////////////////////////////////////////////////////////////
70

    
71
  ScrambleState[] getScrambleStates()
72
    {
73
    if( mStates==null )
74
      {
75
      int size = getNumLayers();
76
      int[] tmp = {0,-1,0, 0,1,0, size-1,-1,0, size-1,1,0 };
77

    
78
      mStates = new ScrambleState[]
79
        {
80
        new ScrambleState( new int[][] {tmp,tmp,tmp,tmp} )
81
        };
82
      }
83

    
84
    return mStates;
85
    }
86

    
87
///////////////////////////////////////////////////////////////////////////////////////////////////
88

    
89
  private void initializeQuats()
90
    {
91
    mQuats = new Static4D[]
92
         {
93
         new Static4D(  0.0f,  0.0f,  0.0f,  1.0f ),
94
         new Static4D(  1.0f,  0.0f,  0.0f,  0.0f ),
95
         new Static4D(  0.0f,  1.0f,  0.0f,  0.0f ),
96
         new Static4D(  0.0f,  0.0f,  1.0f,  0.0f ),
97

    
98
         new Static4D(  0.5f,  0.5f,  0.5f,  0.5f ),
99
         new Static4D(  0.5f,  0.5f,  0.5f, -0.5f ),
100
         new Static4D(  0.5f,  0.5f, -0.5f,  0.5f ),
101
         new Static4D(  0.5f,  0.5f, -0.5f, -0.5f ),
102
         new Static4D(  0.5f, -0.5f,  0.5f,  0.5f ),
103
         new Static4D(  0.5f, -0.5f,  0.5f, -0.5f ),
104
         new Static4D(  0.5f, -0.5f, -0.5f,  0.5f ),
105
         new Static4D(  0.5f, -0.5f, -0.5f, -0.5f )
106
         };
107
    }
108

    
109
///////////////////////////////////////////////////////////////////////////////////////////////////
110

    
111
  int[] getSolvedQuats(int cubit, int numLayers)
112
    {
113
    if( mQuats==null ) initializeQuats();
114
    int status = retCubitSolvedStatus(cubit,numLayers);
115
    return status<0 ? null : buildSolvedQuats(MovementCornerTwisting.FACE_AXIS[status],mQuats);
116
    }
117

    
118
///////////////////////////////////////////////////////////////////////////////////////////////////
119

    
120
  private int getNumCorners()
121
    {
122
    return 8;
123
    }
124

    
125
///////////////////////////////////////////////////////////////////////////////////////////////////
126

    
127
  private int getNumEdges(int layers)
128
    {
129
    return (layers-2)*12;
130
    }
131

    
132
///////////////////////////////////////////////////////////////////////////////////////////////////
133

    
134
  private int getNumCentersPerFace(int layers)
135
    {
136
    return ((layers-2)*(layers-2) + (layers-1)*(layers-1));
137
    }
138

    
139
///////////////////////////////////////////////////////////////////////////////////////////////////
140

    
141
  float getScreenRatio()
142
    {
143
    return 0.5f;
144
    }
145

    
146
///////////////////////////////////////////////////////////////////////////////////////////////////
147

    
148
  Static4D[] getQuats()
149
    {
150
    if( mQuats==null ) initializeQuats();
151
    return mQuats;
152
    }
153

    
154
///////////////////////////////////////////////////////////////////////////////////////////////////
155

    
156
  int getNumFaceColors()
157
    {
158
    return FACE_COLORS.length;
159
    }
160

    
161
///////////////////////////////////////////////////////////////////////////////////////////////////
162

    
163
  int getSolvedFunctionIndex()
164
    {
165
    return 0;
166
    }
167

    
168
///////////////////////////////////////////////////////////////////////////////////////////////////
169

    
170
  boolean shouldResetTextureMaps()
171
    {
172
    return false;
173
    }
174

    
175
///////////////////////////////////////////////////////////////////////////////////////////////////
176

    
177
  int getNumStickerTypes(int numLayers)
178
    {
179
    return 3;
180
    }
181

    
182
///////////////////////////////////////////////////////////////////////////////////////////////////
183

    
184
  float[][] getCuts(int numLayers)
185
    {
186
    switch(numLayers)
187
      {
188
      case 2: float[] c2 = new float[] {0.0f};
189
              return new float[][] { c2,c2,c2,c2 };
190
      case 3: float[] c3 = new float[] {-SQ3/6,+SQ3/6};
191
              return new float[][] { c3,c3,c3,c3 };
192
      }
193
    return null;
194
    }
195

    
196
///////////////////////////////////////////////////////////////////////////////////////////////////
197

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

    
203
///////////////////////////////////////////////////////////////////////////////////////////////////
204

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

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

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

    
217
    /// CORNERS //////////////////////////////////////////////
218

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

    
228
    /// EDGES ///////////////////////////////////////////////
229

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

    
246
    int index=8;
247

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

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

    
260
    /// CENTERS //////////////////////////////////////////////
261

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

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

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

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

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

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

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

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

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

    
303
      x = 3-numLayers;
304

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

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

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

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

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

    
328
    return CENTERS;
329
    }
330

    
331
///////////////////////////////////////////////////////////////////////////////////////////////////
332

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

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

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

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

    
388
    return null;
389
    }
390

    
391
///////////////////////////////////////////////////////////////////////////////////////////////////
392

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

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

    
442
///////////////////////////////////////////////////////////////////////////////////////////////////
443

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

    
449
///////////////////////////////////////////////////////////////////////////////////////////////////
450

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

    
459
///////////////////////////////////////////////////////////////////////////////////////////////////
460

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

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

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

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

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

    
523
///////////////////////////////////////////////////////////////////////////////////////////////////
524

    
525
  int getColor(int face)
526
    {
527
    return FACE_COLORS[face];
528
    }
529

    
530
///////////////////////////////////////////////////////////////////////////////////////////////////
531

    
532
  ObjectSticker retSticker(int face)
533
    {
534
    if( mStickers==null )
535
      {
536
      float[][] STICKERS = new float[][]
537
          {
538
             { -0.5f, 0.25f, 0.25f,  -0.5f, 0.25f, 0.25f  },
539
             { -0.5f, 0.00f, 0.00f,  -0.5f, 0.50f, 0.0f, 0.0f, 0.5f }
540
          };
541

    
542
      final float R1 = 0.025f;
543
      final float R2 = 0.025f;
544
      final float R3 = 0.055f;
545
      final float[][] radii  = { { R1,R1,R1 },{ R2,R2,R2 },{ R3,R3,R3,R3 } };
546
      final float[] strokes = { 0.045f, 0.035f, 0.035f };
547

    
548
      mStickers = new ObjectSticker[STICKERS.length+1];
549

    
550
      for(int s=0; s<STICKERS.length+1; s++)
551
        {
552
        int index = s<2 ? 0:1;
553
        mStickers[s] = new ObjectSticker(STICKERS[index],null,radii[s],strokes[s]);
554
        }
555
      }
556

    
557
    return mStickers[face/NUM_FACE_COLORS];
558
    }
559

    
560
///////////////////////////////////////////////////////////////////////////////////////////////////
561

    
562
  float returnMultiplier()
563
    {
564
    return 2.0f;
565
    }
566

    
567
///////////////////////////////////////////////////////////////////////////////////////////////////
568
// PUBLIC API
569

    
570
  public Static3D[] getRotationAxis()
571
    {
572
    return ROT_AXIS;
573
    }
574

    
575
///////////////////////////////////////////////////////////////////////////////////////////////////
576

    
577
  public Movement getMovement()
578
    {
579
    if( mMovement==null ) mMovement = new MovementCornerTwisting();
580
    return mMovement;
581
    }
582

    
583
///////////////////////////////////////////////////////////////////////////////////////////////////
584

    
585
  public int[] getBasicAngle()
586
    {
587
    if( mBasicAngle ==null ) mBasicAngle = new int[] { 3,3,3,3 };
588
    return mBasicAngle;
589
    }
590

    
591
///////////////////////////////////////////////////////////////////////////////////////////////////
592

    
593
  public int getObjectName(int numLayers)
594
    {
595
    switch(numLayers)
596
      {
597
      case 2: return R.string.skew2;
598
      case 3: return R.string.skew3;
599
      }
600
    return R.string.skew2;
601
    }
602

    
603
///////////////////////////////////////////////////////////////////////////////////////////////////
604

    
605
  public int getInventor(int numLayers)
606
    {
607
    switch(numLayers)
608
      {
609
      case 2: return R.string.skew2_inventor;
610
      case 3: return R.string.skew3_inventor;
611
      }
612
    return R.string.skew2_inventor;
613
    }
614

    
615
///////////////////////////////////////////////////////////////////////////////////////////////////
616

    
617
  public int getComplexity(int numLayers)
618
    {
619
    switch(numLayers)
620
      {
621
      case 2: return 4;
622
      case 3: return 8;
623
      }
624
    return 5;
625
    }
626
}
(40-40/44)