Project

General

Profile

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

magiccube / src / main / java / org / distorted / objects / TwistyRex.java @ efa81f0c

1 59b87d56 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
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 a38fe4b2 Leszek Koltunski
import org.distorted.helpers.ObjectShape;
25 9c06394a Leszek Koltunski
import org.distorted.helpers.ObjectSticker;
26 6cf89a3e Leszek Koltunski
import org.distorted.helpers.ScrambleState;
27 59b87d56 Leszek Koltunski
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 efa81f0c Leszek Koltunski
public class TwistyRex extends Twisty6
37 59b87d56 Leszek Koltunski
{
38
  static final Static3D[] ROT_AXIS = new Static3D[]
39
         {
40
           new Static3D(+SQ3/3,+SQ3/3,+SQ3/3),
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
         };
45
46 f242ba04 Leszek Koltunski
  public static final float REX_D = 0.2f;
47 9c06394a Leszek Koltunski
48 91792184 Leszek Koltunski
  private ScrambleState[] mStates;
49 f242ba04 Leszek Koltunski
  private int[] mBasicAngle;
50
  private Static4D[] mQuats;
51
  private int[][] mFaceMap;
52
  private ObjectSticker[] mStickers;
53 e9a87113 Leszek Koltunski
  private Movement mMovement;
54 01b2ef5a Leszek Koltunski
55 59b87d56 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
56
57
  TwistyRex(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
58
            DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
59
    {
60 db875721 Leszek Koltunski
    super(size, size, quat, texture, mesh, effects, moves, ObjectList.REX, res, scrWidth);
61 91792184 Leszek Koltunski
    }
62 01b2ef5a Leszek Koltunski
63 91792184 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
64 01b2ef5a Leszek Koltunski
65 91792184 Leszek Koltunski
  ScrambleState[] getScrambleStates()
66
    {
67
    if( mStates==null )
68 01b2ef5a Leszek Koltunski
      {
69 91792184 Leszek Koltunski
      int[] tmp = {0,-1,0, 0,1,0, 2,-1,0, 2,1,0 };
70
71
      mStates = new ScrambleState[]
72
        {
73
        new ScrambleState( new int[][] {tmp,tmp,tmp,tmp} )
74
        };
75
      }
76
77
    return mStates;
78 59b87d56 Leszek Koltunski
    }
79
80 f242ba04 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
81
82
  private void initializeQuats()
83
    {
84
    mQuats = new Static4D[]
85
         {
86
         new Static4D(  0.0f,  0.0f,  0.0f,  1.0f ),
87
         new Static4D(  1.0f,  0.0f,  0.0f,  0.0f ),
88
         new Static4D(  0.0f,  1.0f,  0.0f,  0.0f ),
89
         new Static4D(  0.0f,  0.0f,  1.0f,  0.0f ),
90
91
         new Static4D(  0.5f,  0.5f,  0.5f,  0.5f ),
92
         new Static4D(  0.5f,  0.5f,  0.5f, -0.5f ),
93
         new Static4D(  0.5f,  0.5f, -0.5f,  0.5f ),
94
         new Static4D(  0.5f,  0.5f, -0.5f, -0.5f ),
95
         new Static4D(  0.5f, -0.5f,  0.5f,  0.5f ),
96
         new Static4D(  0.5f, -0.5f,  0.5f, -0.5f ),
97
         new Static4D(  0.5f, -0.5f, -0.5f,  0.5f ),
98
         new Static4D(  0.5f, -0.5f, -0.5f, -0.5f )
99
         };
100
    }
101
102 a480ee80 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
103
104
  int[] getSolvedQuats(int cubit, int numLayers)
105
    {
106 f242ba04 Leszek Koltunski
    if( mQuats==null ) initializeQuats();
107 a480ee80 Leszek Koltunski
    int status = retCubitSolvedStatus(cubit,numLayers);
108 e782e026 Leszek Koltunski
    return status<0 ? null : buildSolvedQuats(MovementCornerTwisting.FACE_AXIS[status],mQuats);
109 a480ee80 Leszek Koltunski
    }
110
111 59b87d56 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
112
113
  Static4D[] getQuats()
114
    {
115 f242ba04 Leszek Koltunski
    if( mQuats==null ) initializeQuats();
116
    return mQuats;
117 59b87d56 Leszek Koltunski
    }
118
119 169219a7 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
120
121
  int getSolvedFunctionIndex()
122
    {
123
    return 0;
124
    }
125
126 59b87d56 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
127
128 a64e07d0 Leszek Koltunski
  int getNumStickerTypes(int numLayers)
129 59b87d56 Leszek Koltunski
    {
130 f242ba04 Leszek Koltunski
    return 3;
131 59b87d56 Leszek Koltunski
    }
132
133
///////////////////////////////////////////////////////////////////////////////////////////////////
134
135 e6734aa9 Leszek Koltunski
  float[][] getCuts(int numLayers)
136 59b87d56 Leszek Koltunski
    {
137 16861599 Leszek Koltunski
    float C = SQ3*0.45f; // bit less than 1/2 of the length of the main diagonal
138 c75ab933 Leszek Koltunski
    float[] cut = new float[] {-C,+C};
139 e6734aa9 Leszek Koltunski
    return new float[][] { cut,cut,cut,cut };
140 59b87d56 Leszek Koltunski
    }
141
142
///////////////////////////////////////////////////////////////////////////////////////////////////
143
144
  int getNumCubitFaces()
145
    {
146 f242ba04 Leszek Koltunski
    return 6;
147 59b87d56 Leszek Koltunski
    }
148
149
///////////////////////////////////////////////////////////////////////////////////////////////////
150
151 e6cf7283 Leszek Koltunski
  float[][] getCubitPositions(int numLayers)
152 59b87d56 Leszek Koltunski
    {
153 16861599 Leszek Koltunski
    final float DIST1= 1.50f;
154
    final float DIST2= (1+2*REX_D)/2;
155
    final float DIST3= 1.53f;
156 c75ab933 Leszek Koltunski
157
    final float[][] CENTERS = new float[24+6+12][];
158
159
    CENTERS[ 0] = new float[] { +DIST3, +DIST2, +DIST2};
160
    CENTERS[ 1] = new float[] { +DIST3, +DIST2, -DIST2};
161
    CENTERS[ 2] = new float[] { +DIST3, -DIST2, -DIST2};
162
    CENTERS[ 3] = new float[] { +DIST3, -DIST2, +DIST2};
163
    CENTERS[ 4] = new float[] { -DIST3, +DIST2, +DIST2};
164
    CENTERS[ 5] = new float[] { -DIST3, +DIST2, -DIST2};
165
    CENTERS[ 6] = new float[] { -DIST3, -DIST2, -DIST2};
166
    CENTERS[ 7] = new float[] { -DIST3, -DIST2, +DIST2};
167
    CENTERS[ 8] = new float[] { +DIST2, +DIST3, +DIST2};
168
    CENTERS[ 9] = new float[] { +DIST2, +DIST3, -DIST2};
169
    CENTERS[10] = new float[] { -DIST2, +DIST3, -DIST2};
170
    CENTERS[11] = new float[] { -DIST2, +DIST3, +DIST2};
171
    CENTERS[12] = new float[] { +DIST2, -DIST3, +DIST2};
172
    CENTERS[13] = new float[] { +DIST2, -DIST3, -DIST2};
173
    CENTERS[14] = new float[] { -DIST2, -DIST3, -DIST2};
174
    CENTERS[15] = new float[] { -DIST2, -DIST3, +DIST2};
175
    CENTERS[16] = new float[] { +DIST2, +DIST2, +DIST3};
176
    CENTERS[17] = new float[] { +DIST2, -DIST2, +DIST3};
177
    CENTERS[18] = new float[] { -DIST2, -DIST2, +DIST3};
178
    CENTERS[19] = new float[] { -DIST2, +DIST2, +DIST3};
179
    CENTERS[20] = new float[] { +DIST2, +DIST2, -DIST3};
180
    CENTERS[21] = new float[] { +DIST2, -DIST2, -DIST3};
181
    CENTERS[22] = new float[] { -DIST2, -DIST2, -DIST3};
182
    CENTERS[23] = new float[] { -DIST2, +DIST2, -DIST3};
183
184
    CENTERS[24] = new float[] { +DIST3, +0.00f, +0.00f};
185
    CENTERS[25] = new float[] { -DIST3, +0.00f, +0.00f};
186
    CENTERS[26] = new float[] { +0.00f, +DIST3, +0.00f};
187
    CENTERS[27] = new float[] { +0.00f, -DIST3, +0.00f};
188
    CENTERS[28] = new float[] { +0.00f, +0.00f, +DIST3};
189
    CENTERS[29] = new float[] { +0.00f, +0.00f, -DIST3};
190
191
    CENTERS[30] = new float[] { +0.00f, +DIST1, +DIST1};
192
    CENTERS[31] = new float[] { +DIST1, +0.00f, +DIST1};
193
    CENTERS[32] = new float[] { +0.00f, -DIST1, +DIST1};
194
    CENTERS[33] = new float[] { -DIST1, +0.00f, +DIST1};
195
    CENTERS[34] = new float[] { +DIST1, +DIST1, +0.00f};
196
    CENTERS[35] = new float[] { +DIST1, -DIST1, +0.00f};
197
    CENTERS[36] = new float[] { -DIST1, -DIST1, +0.00f};
198
    CENTERS[37] = new float[] { -DIST1, +DIST1, +0.00f};
199
    CENTERS[38] = new float[] { +0.00f, +DIST1, -DIST1};
200
    CENTERS[39] = new float[] { +DIST1, +0.00f, -DIST1};
201
    CENTERS[40] = new float[] { +0.00f, -DIST1, -DIST1};
202
    CENTERS[41] = new float[] { -DIST1, +0.00f, -DIST1};
203 59b87d56 Leszek Koltunski
204
    return CENTERS;
205
    }
206
207
///////////////////////////////////////////////////////////////////////////////////////////////////
208
209 a38fe4b2 Leszek Koltunski
  ObjectShape getObjectShape(int cubit, int numLayers)
210
    {
211
    int variant = getCubitVariant(cubit,numLayers);
212
213
    if( variant==0 )
214
      {
215
      float G = (1-REX_D)*SQ2/2;
216 16861599 Leszek Koltunski
      double[][] vertices ={{-0.10f,0.70f,0},{-0.70f,0.10f,0},{+0.65f,-0.71f,0},{+0.71f,-0.65f,0}};
217 a38fe4b2 Leszek Koltunski
      int[][] vertIndexes = { {0,1,2,3},{3,2,1,0} };
218 16861599 Leszek Koltunski
      float[][] centers= new float[][] { {0.0f,0.0f,-G} };
219
      float[][] corners= new float[][] { {0.03f,0.30f} };
220 a38fe4b2 Leszek Koltunski
      int[] indices= {-1,-1,0,0};
221
      int[] bandIndices= new int[] { 0,1 };
222 16861599 Leszek Koltunski
      float[][] bands = { {+0.016f,10,G/3,0.5f,5,1,1},{+0.230f,45,G/3,0.0f,2,0,0} };
223 a38fe4b2 Leszek Koltunski
224
      return new ObjectShape(vertices,vertIndexes,bands,bandIndices,corners,indices,centers,indices,getNumCubitFaces(), null);
225
      }
226
    else if( variant==1 )
227
      {
228 16861599 Leszek Koltunski
      float G = 3*REX_D;
229
      double[][] vertices= { { -G, 0, 0 },{ 0, -G, 0 },{ +G, 0, 0 },{ 0,+G,0 } };
230 a38fe4b2 Leszek Koltunski
      int[][] vertIndexes= { {0,1,2,3},{3,2,1,0} };
231
      int[] indices= {-1,-1,-1,-1};
232
      int[] bandIndices= new int[] { 0,1 };
233 16861599 Leszek Koltunski
      float[][] bands = { {0.025f,10,G/2,0.5f,5,0,0},{0.000f,45,G/2,0.0f,2,0,0} };
234 a38fe4b2 Leszek Koltunski
235
      return new ObjectShape(vertices,vertIndexes,bands,bandIndices,null,indices,null,indices,getNumCubitFaces(), null);
236
      }
237
    else
238
      {
239 16861599 Leszek Koltunski
      float E = 1.5f - 3*REX_D;
240
      float F = 1.5f;
241 a38fe4b2 Leszek Koltunski
      float G = (float)Math.sqrt(E*E+F*F);
242 16861599 Leszek Koltunski
      double[][] vertices = { { -F, 0, 0 },{  0,-E, 0 },{ +F, 0, 0 },{  0, 0,-E } };
243 a38fe4b2 Leszek Koltunski
      int[][] vertIndexes = { {0,1,2}, {0,2,3}, {0,3,1}, {1,3,2} };
244 16861599 Leszek Koltunski
      float[][] centers= new float[][] { {0.0f,-1.5f,-1.5f} };
245
      float[][] corners= new float[][] { {0.06f,0.20f} };
246 a38fe4b2 Leszek Koltunski
      int[] indices= {0,-1,0,-1};
247
      int[] bandIndices= new int[] { 0,0,1,1 };
248 16861599 Leszek Koltunski
      float[][] bands = { {0.03f,27,F/3,0.8f,5,2,3},{0.01f,45,G/3,0.2f,3,1,2} };
249 a38fe4b2 Leszek Koltunski
250
      return new ObjectShape(vertices,vertIndexes,bands,bandIndices,corners,indices,centers,indices,getNumCubitFaces(), null);
251
      }
252
    }
253
254
///////////////////////////////////////////////////////////////////////////////////////////////////
255
256 3e605536 Leszek Koltunski
  Static4D getQuat(int cubit, int numLayers)
257 59b87d56 Leszek Koltunski
    {
258 f242ba04 Leszek Koltunski
    if( mQuats==null ) initializeQuats();
259
260 59b87d56 Leszek Koltunski
    switch(cubit)
261
      {
262 80ec6abf Leszek Koltunski
      case  0: return new Static4D(+SQ2/2,     0,+SQ2/2,     0);
263 f242ba04 Leszek Koltunski
      case  1: return mQuats[5];
264 80ec6abf Leszek Koltunski
      case  2: return new Static4D(     0,-SQ2/2,     0, SQ2/2);
265 f242ba04 Leszek Koltunski
      case  3: return mQuats[8];
266
      case  4: return mQuats[6];
267 80ec6abf Leszek Koltunski
      case  5: return new Static4D(-SQ2/2,     0,+SQ2/2,     0);
268 f242ba04 Leszek Koltunski
      case  6: return mQuats[11];
269 80ec6abf Leszek Koltunski
      case  7: return new Static4D(     0,+SQ2/2,     0, SQ2/2);
270
      case  8: return new Static4D(+SQ2/2,     0,     0, SQ2/2);
271 f242ba04 Leszek Koltunski
      case  9: return mQuats[10];
272 59b87d56 Leszek Koltunski
      case 10: return new Static4D(     0,+SQ2/2,+SQ2/2,     0);
273 f242ba04 Leszek Koltunski
      case 11: return mQuats[4];
274
      case 12: return mQuats[9];
275 59b87d56 Leszek Koltunski
      case 13: return new Static4D(-SQ2/2,     0,     0, SQ2/2);
276 f242ba04 Leszek Koltunski
      case 14: return mQuats[7];
277 59b87d56 Leszek Koltunski
      case 15: return new Static4D(     0,-SQ2/2,+SQ2/2,     0);
278
      case 16: return new Static4D(     0,     0,-SQ2/2, SQ2/2);
279 f242ba04 Leszek Koltunski
      case 17: return mQuats[0];
280 59b87d56 Leszek Koltunski
      case 18: return new Static4D(     0,     0,+SQ2/2, SQ2/2);
281 f242ba04 Leszek Koltunski
      case 19: return mQuats[3];
282
      case 20: return mQuats[1];
283 80ec6abf Leszek Koltunski
      case 21: return new Static4D(+SQ2/2,-SQ2/2,     0,     0);
284 f242ba04 Leszek Koltunski
      case 22: return mQuats[2];
285 80ec6abf Leszek Koltunski
      case 23: return new Static4D(+SQ2/2,+SQ2/2,     0,     0);
286 59b87d56 Leszek Koltunski
287 80ec6abf Leszek Koltunski
      case 24: return new Static4D(     0,-SQ2/2,     0, SQ2/2);
288
      case 25: return new Static4D(     0,+SQ2/2,     0, SQ2/2);
289 59b87d56 Leszek Koltunski
      case 26: return new Static4D(+SQ2/2,     0,     0, SQ2/2);
290
      case 27: return new Static4D(-SQ2/2,     0,     0, SQ2/2);
291 f242ba04 Leszek Koltunski
      case 28: return mQuats[0];
292
      case 29: return mQuats[1];
293 59b87d56 Leszek Koltunski
294 f242ba04 Leszek Koltunski
      case 30: return mQuats[0];
295 59b87d56 Leszek Koltunski
      case 31: return new Static4D(     0,     0,+SQ2/2, SQ2/2);
296 f242ba04 Leszek Koltunski
      case 32: return mQuats[3];
297 59b87d56 Leszek Koltunski
      case 33: return new Static4D(     0,     0,-SQ2/2, SQ2/2);
298 80ec6abf Leszek Koltunski
      case 34: return new Static4D(     0,-SQ2/2,     0, SQ2/2);
299 f242ba04 Leszek Koltunski
      case 35: return mQuats[7];
300
      case 36: return mQuats[9];
301 80ec6abf Leszek Koltunski
      case 37: return new Static4D(     0,+SQ2/2,     0, SQ2/2);
302 59b87d56 Leszek Koltunski
      case 38: return new Static4D(+SQ2/2,     0,     0, SQ2/2);
303 f242ba04 Leszek Koltunski
      case 39: return mQuats[8];
304
      case 40: return mQuats[1];
305
      case 41: return mQuats[6];
306 59b87d56 Leszek Koltunski
      }
307
308 f242ba04 Leszek Koltunski
    return mQuats[0];
309 59b87d56 Leszek Koltunski
    }
310
311
///////////////////////////////////////////////////////////////////////////////////////////////////
312
313 3e605536 Leszek Koltunski
  int getNumCubitVariants(int numLayers)
314 59b87d56 Leszek Koltunski
    {
315 a38fe4b2 Leszek Koltunski
    return 3;
316
    }
317 c75ab933 Leszek Koltunski
318 a38fe4b2 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
319 c75ab933 Leszek Koltunski
320 a38fe4b2 Leszek Koltunski
  int getCubitVariant(int cubit, int numLayers)
321
    {
322
    return cubit<24 ? 0 : (cubit<30?1:2);
323
    }
324 c75ab933 Leszek Koltunski
325 59b87d56 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
326
327
  int getFaceColor(int cubit, int cubitface, int numLayers)
328
    {
329 f242ba04 Leszek Koltunski
    if( mFaceMap==null )
330
      {
331
      mFaceMap = new int[][]
332
         {
333
           {  0, 18,18,18,18,18 },
334
           {  0, 18,18,18,18,18 },
335
           {  0, 18,18,18,18,18 },
336
           {  0, 18,18,18,18,18 },
337
           {  1, 18,18,18,18,18 },
338
           {  1, 18,18,18,18,18 },
339
           {  1, 18,18,18,18,18 },
340
           {  1, 18,18,18,18,18 },
341
           {  2, 18,18,18,18,18 },
342
           {  2, 18,18,18,18,18 },
343
           {  2, 18,18,18,18,18 },
344
           {  2, 18,18,18,18,18 },
345
           {  3, 18,18,18,18,18 },
346
           {  3, 18,18,18,18,18 },
347
           {  3, 18,18,18,18,18 },
348
           {  3, 18,18,18,18,18 },
349
           {  4, 18,18,18,18,18 },
350
           {  4, 18,18,18,18,18 },
351
           {  4, 18,18,18,18,18 },
352
           {  4, 18,18,18,18,18 },
353
           {  5, 18,18,18,18,18 },
354
           {  5, 18,18,18,18,18 },
355
           {  5, 18,18,18,18,18 },
356
           {  5, 18,18,18,18,18 },
357
358
           {  6, 18,18,18,18,18 },
359
           {  7, 18,18,18,18,18 },
360
           {  8, 18,18,18,18,18 },
361
           {  9, 18,18,18,18,18 },
362
           { 10, 18,18,18,18,18 },
363
           { 11, 18,18,18,18,18 },
364
365
           { 16,14, 18,18,18,18 },
366
           { 16,12, 18,18,18,18 },
367
           { 16,15, 18,18,18,18 },
368
           { 16,13, 18,18,18,18 },
369
           { 12,14, 18,18,18,18 },
370
           { 15,12, 18,18,18,18 },
371
           { 15,13, 18,18,18,18 },
372
           { 13,14, 18,18,18,18 },
373
           { 14,17, 18,18,18,18 },
374
           { 12,17, 18,18,18,18 },
375
           { 17,15, 18,18,18,18 },
376
           { 13,17, 18,18,18,18 },
377
         };
378
      }
379
380 59b87d56 Leszek Koltunski
    return mFaceMap[cubit][cubitface];
381
    }
382
383 9c06394a Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
384 29bc084f Leszek Koltunski
385 9c06394a Leszek Koltunski
  ObjectSticker retSticker(int face)
386
    {
387 f242ba04 Leszek Koltunski
    if( mStickers==null )
388
      {
389
      float[][] STICKERS = new float[][]
390
          {
391
             { -0.5f, 0.1428f, -0.1428f, 0.5f, 0.35f, -0.35f },
392
             { -0.5f, 0.0f, 0.0f, -0.5f, 0.5f, 0.0f, 0.0f, 0.5f },
393
             { -0.525f, 0.105f, 0.525f, 0.105f, 0.000f, -0.210f  }
394
          };
395
396
      final float F = (float)(Math.PI/20);
397
      final float R1= 0.02f;
398
      final float R2= 0.09f;
399
      final float R3= 0.06f;
400
      final float[][] angles = { { -F/2,F,F },null,{ F/10,-F,-F } };
401
      final float[][] radii  = { {R1,R1,R1},{R2,R2,R2,R2},{0,0,R3} };
402
      final float[] strokes = { 0.06f, 0.07f, 0.05f };
403
404
      mStickers = new ObjectSticker[STICKERS.length];
405
406
      for(int s=0; s<STICKERS.length; s++)
407
        {
408
        mStickers[s] = new ObjectSticker(STICKERS[s],angles[s],radii[s],strokes[s]);
409
        }
410
      }
411
412 abf36986 Leszek Koltunski
    return mStickers[face/NUM_FACE_COLORS];
413 59b87d56 Leszek Koltunski
    }
414
415
///////////////////////////////////////////////////////////////////////////////////////////////////
416 e1dc3366 Leszek Koltunski
// PUBLIC API
417 59b87d56 Leszek Koltunski
418 e1dc3366 Leszek Koltunski
  public Static3D[] getRotationAxis()
419
    {
420
    return ROT_AXIS;
421
    }
422
423 e9a87113 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
424
425
  public Movement getMovement()
426
    {
427
    if( mMovement==null ) mMovement = new MovementCornerTwisting();
428
    return mMovement;
429
    }
430
431 e1dc3366 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
432
433
  public int[] getBasicAngle()
434
    {
435 f242ba04 Leszek Koltunski
    if( mBasicAngle ==null ) mBasicAngle = new int[] { 3,3,3,3 };
436
    return mBasicAngle;
437 e1dc3366 Leszek Koltunski
    }
438
439 59b87d56 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
440
441
  public int getObjectName(int numLayers)
442
    {
443
    return R.string.rex3;
444
    }
445
446
///////////////////////////////////////////////////////////////////////////////////////////////////
447
448
  public int getInventor(int numLayers)
449
    {
450
    return R.string.rex3_inventor;
451
    }
452
453
///////////////////////////////////////////////////////////////////////////////////////////////////
454
455
  public int getComplexity(int numLayers)
456
    {
457
    return 3;
458
    }
459
}