1
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2
|
// Copyright 2020 Leszek Koltunski //
|
3
|
// //
|
4
|
// This file is part of Magic Cube. //
|
5
|
// //
|
6
|
// Magic Cube is proprietary software licensed under an EULA which you should have received //
|
7
|
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html //
|
8
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
9
|
|
10
|
package org.distorted.objectlib.objects;
|
11
|
|
12
|
import static org.distorted.objectlib.touchcontrol.TouchControl.TC_HEXAHEDRON;
|
13
|
import static org.distorted.objectlib.touchcontrol.TouchControl.TYPE_SPLIT_CORNER;
|
14
|
|
15
|
import org.distorted.library.type.Static3D;
|
16
|
import org.distorted.library.type.Static4D;
|
17
|
|
18
|
import org.distorted.objectlib.helpers.FactoryCubit;
|
19
|
import org.distorted.objectlib.helpers.ObjectFaceShape;
|
20
|
import org.distorted.objectlib.metadata.Metadata;
|
21
|
import org.distorted.objectlib.helpers.ObjectVertexEffects;
|
22
|
import org.distorted.objectlib.main.InitAssets;
|
23
|
import org.distorted.objectlib.scrambling.ScrambleEdgeGenerator;
|
24
|
import org.distorted.objectlib.touchcontrol.TouchControlHexahedron;
|
25
|
import org.distorted.objectlib.metadata.ListObjects;
|
26
|
import org.distorted.objectlib.helpers.ObjectShape;
|
27
|
import org.distorted.objectlib.shape.ShapeHexahedron;
|
28
|
|
29
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
30
|
|
31
|
public class TwistyRedi extends ShapeHexahedron
|
32
|
{
|
33
|
static final Static3D[] ROT_AXIS = new Static3D[]
|
34
|
{
|
35
|
new Static3D( SQ3/3, SQ3/3, SQ3/3),
|
36
|
new Static3D( SQ3/3, SQ3/3,-SQ3/3),
|
37
|
new Static3D( SQ3/3,-SQ3/3, SQ3/3),
|
38
|
new Static3D( SQ3/3,-SQ3/3,-SQ3/3)
|
39
|
};
|
40
|
|
41
|
private int[][] mEdges;
|
42
|
private int[][] mBasicAngle;
|
43
|
private float[][] mCuts;
|
44
|
private float[][] mPosition;
|
45
|
private int[] mQuatIndex;
|
46
|
private boolean[][] mRotatable;
|
47
|
|
48
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
49
|
|
50
|
public TwistyRedi(int iconMode, Static4D quat, Static3D move, float scale, Metadata meta, InitAssets asset)
|
51
|
{
|
52
|
super(iconMode, meta.getNumLayers()[0], quat, move, scale, meta, asset);
|
53
|
}
|
54
|
|
55
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
56
|
|
57
|
@Override
|
58
|
public float[][] returnRotationFactor()
|
59
|
{
|
60
|
float C = 2.0f;
|
61
|
int numL = getNumLayers()[0];
|
62
|
float[] f = new float[numL];
|
63
|
for(int i=0; i<numL; i++) f[i] = C;
|
64
|
return new float[][] { f,f,f,f };
|
65
|
}
|
66
|
|
67
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
68
|
|
69
|
public int[][] getScrambleEdges()
|
70
|
{
|
71
|
if( mEdges==null )
|
72
|
{
|
73
|
int[] numLayers = getNumLayers();
|
74
|
|
75
|
if( numLayers[0]==3 )
|
76
|
{
|
77
|
mEdges = new int[][]
|
78
|
{
|
79
|
{ 0,8,1,8, 4,1,5,1, 6,7,7,7, 10,2,11,2, 12,6,13,6, 16,3,17,3, 18,5,19,5, 22,4,23,4 }, // 0
|
80
|
{ 10,2,11,2, 16,3,17,3, 18,5,19,5 }, // 1
|
81
|
{ 4,1,5,1, 12,6,13,6, 22,4,23,4 }, // 2
|
82
|
{ 4,1,5,1, 6,7,7,7, 22,4,23,4 }, // 3
|
83
|
{ 0,8,1,8, 10,2,11,2, 16,3,17,3 }, // 4
|
84
|
{ 4,1,5,1, 6,7,7,7, 12,6,13,6 }, // 5
|
85
|
{ 0,8,1,8, 10,2,11,2, 18,5,19,5 }, // 6
|
86
|
{ 0,8,1,8, 16,3,17,3, 18,5,19,5 }, // 7
|
87
|
{ 6,7,7,7, 12,6,13,6, 22,4,23,4 }, // 8
|
88
|
};
|
89
|
}
|
90
|
else
|
91
|
{
|
92
|
mEdges = new int[][]
|
93
|
{
|
94
|
{ 0,16,1,16,2,8,3,8, 4,1,5,1,6,9,7,9, 8,15,9,15,10,7,11,7, 12,2,13,2,14,10,15,10, 16,14,17,14,18,6,19,6, 20,3,21,3,22,11,23,11, 24,13,25,13,26,5,27,5, 28,4,29,4,30,12,31,12 }, // 0
|
95
|
|
96
|
{ 12,2,13,2,14,10,15,10, 20,3,21,3,22,11,23,11, 24,13,25,13,26,5,27,5, }, // 1
|
97
|
{ 4,1,5,1,6,9,7,9, 16,14,17,14,18,6,19,6, 28,4,29,4,30,12,31,12 }, // 2
|
98
|
{ 4,1,5,1,6,9,7,9, 8,15,9,15,10,7,11,7, 28,4,29,4,30,12,31,12 }, // 3
|
99
|
{ 0,16,1,16,2,8,3,8, 12,2,13,2,14,10,15,10, 20,3,21,3,22,11,23,11, }, // 4
|
100
|
{ 4,1,5,1,6,9,7,9, 8,15,9,15,10,7,11,7, 16,14,17,14,18,6,19,6, }, // 5
|
101
|
{ 0,16,1,16,2,8,3,8, 12,2,13,2,14,10,15,10, 24,13,25,13,26,5,27,5, }, // 6
|
102
|
{ 0,16,1,16,2,8,3,8, 20,3,21,3,22,11,23,11, 24,13,25,13,26,5,27,5, }, // 7
|
103
|
{ 8,15,9,15,10,7,11,7, 16,14,17,14,18,6,19,6, 28,4,29,4,30,12,31,12 }, // 8
|
104
|
|
105
|
{ 12,2,13,2, 20,3,21,3, 26,5,27,5, }, // 9
|
106
|
{ 4,1,5,1, 18,6,19,6, 28,4,29,4, }, // 10
|
107
|
{ 4,1,5,1, 10,7,11,7, 28,4,29,4, }, // 11
|
108
|
{ 2,8,3,8, 12,2,13,2, 20,3,21,3, }, // 12
|
109
|
{ 4,1,5,1, 10,7,11,7, 18,6,19,6, }, // 13
|
110
|
{ 2,8,3,8, 12,2,13,2, 26,5,27,5, }, // 14
|
111
|
{ 2,8,3,8, 20,3,21,3, 26,5,27,5, }, // 15
|
112
|
{ 10,7,11,7, 18,6,19,6, 28,4,29,4, }, // 16
|
113
|
};
|
114
|
}
|
115
|
}
|
116
|
|
117
|
return mEdges;
|
118
|
}
|
119
|
|
120
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
121
|
|
122
|
@Override
|
123
|
public int[][] getScrambleAlgorithms()
|
124
|
{
|
125
|
int[] numLayers = getNumLayers();
|
126
|
|
127
|
if( numLayers[0]==3 )
|
128
|
{
|
129
|
return super.getScrambleAlgorithms();
|
130
|
}
|
131
|
else
|
132
|
{
|
133
|
if(mRotatable==null) mRotatable = createRotatable();
|
134
|
return ScrambleEdgeGenerator.getScramblingAlgorithms(mBasicAngle, mRotatable);
|
135
|
}
|
136
|
}
|
137
|
|
138
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
139
|
|
140
|
public float[][] getCuts(int[] numLayers)
|
141
|
{
|
142
|
if( mCuts==null )
|
143
|
{
|
144
|
switch( numLayers[0] )
|
145
|
{
|
146
|
case 3: float C3 = SQ3/2 + 0.05f;
|
147
|
float[] c3 = new float[] {-C3,C3};
|
148
|
mCuts = new float[][] { c3,c3,c3,c3 };
|
149
|
break;
|
150
|
case 5: float A5 = 5*SQ3/3;
|
151
|
float B5 = 3*SQ3/3;
|
152
|
float[] c5 = new float[] {-A5,-B5, B5, A5};
|
153
|
mCuts = new float[][] { c5,c5,c5,c5 };
|
154
|
break;
|
155
|
}
|
156
|
|
157
|
}
|
158
|
|
159
|
return mCuts;
|
160
|
}
|
161
|
|
162
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
163
|
|
164
|
private boolean[][] createRotatable()
|
165
|
{
|
166
|
int numL = getNumLayers()[0];
|
167
|
|
168
|
switch( numL )
|
169
|
{
|
170
|
case 3: boolean[] t3 = new boolean[] {true,false,true};
|
171
|
return new boolean[][] { t3,t3,t3,t3 };
|
172
|
case 5: boolean[] t5 = new boolean[] {true,true,false,true,true};
|
173
|
return new boolean[][] { t5,t5,t5,t5 };
|
174
|
}
|
175
|
return null;
|
176
|
}
|
177
|
|
178
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
179
|
|
180
|
public boolean[][] getLayerRotatable(int[] numLayers)
|
181
|
{
|
182
|
if( mRotatable==null ) mRotatable = createRotatable();
|
183
|
return mRotatable;
|
184
|
}
|
185
|
|
186
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
187
|
|
188
|
public int getTouchControlType()
|
189
|
{
|
190
|
return TC_HEXAHEDRON;
|
191
|
}
|
192
|
|
193
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
194
|
|
195
|
public int getTouchControlSplit()
|
196
|
{
|
197
|
return TYPE_SPLIT_CORNER;
|
198
|
}
|
199
|
|
200
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
201
|
|
202
|
public int[][][] getEnabled()
|
203
|
{
|
204
|
return new int[][][]
|
205
|
{
|
206
|
{{0,1},{3,1},{2,3},{0,2}},
|
207
|
{{2,3},{3,1},{0,1},{0,2}},
|
208
|
{{1,2},{0,1},{0,3},{2,3}},
|
209
|
{{1,2},{2,3},{0,3},{0,1}},
|
210
|
{{0,3},{0,2},{1,2},{1,3}},
|
211
|
{{1,2},{0,2},{0,3},{1,3}},
|
212
|
};
|
213
|
}
|
214
|
|
215
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
216
|
|
217
|
public float[] getDist3D(int[] numLayers)
|
218
|
{
|
219
|
return TouchControlHexahedron.D3D;
|
220
|
}
|
221
|
|
222
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
223
|
|
224
|
public Static3D[] getFaceAxis()
|
225
|
{
|
226
|
return TouchControlHexahedron.FACE_AXIS;
|
227
|
}
|
228
|
|
229
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
230
|
|
231
|
public float[][] getCubitPositions(int[] numLayers)
|
232
|
{
|
233
|
if( mPosition==null )
|
234
|
{
|
235
|
if( numLayers[0]==3 )
|
236
|
{
|
237
|
final float C = 1.0f;
|
238
|
final float E = 1.5f;
|
239
|
|
240
|
mPosition = new float[][]
|
241
|
{
|
242
|
{ C, C, C },
|
243
|
{ C, C,-C },
|
244
|
{ C,-C, C },
|
245
|
{ C,-C,-C },
|
246
|
{-C, C, C },
|
247
|
{-C, C,-C },
|
248
|
{-C,-C, C },
|
249
|
{-C,-C,-C },
|
250
|
|
251
|
{ 0, E, E },
|
252
|
{ E, 0, E },
|
253
|
{ 0,-E, E },
|
254
|
{-E, 0, E },
|
255
|
{ E, E, 0 },
|
256
|
{ E,-E, 0 },
|
257
|
{-E,-E, 0 },
|
258
|
{-E, E, 0 },
|
259
|
{ 0, E,-E },
|
260
|
{ E, 0,-E },
|
261
|
{ 0,-E,-E },
|
262
|
{-E, 0,-E }
|
263
|
};
|
264
|
}
|
265
|
else if( numLayers[0]==5 )
|
266
|
{
|
267
|
final float C = 15.0f/8;
|
268
|
final float E = 2.5f;
|
269
|
final float F = 5.0f/8;
|
270
|
|
271
|
mPosition = new float[][]
|
272
|
{
|
273
|
{ C, C, C },
|
274
|
{ C, C,-C },
|
275
|
{ C,-C, C },
|
276
|
{ C,-C,-C },
|
277
|
{-C, C, C },
|
278
|
{-C, C,-C },
|
279
|
{-C,-C, C },
|
280
|
{-C,-C,-C },
|
281
|
|
282
|
{-F, E, E },
|
283
|
{ F, E, E },
|
284
|
{ E,-F, E },
|
285
|
{ E, F, E },
|
286
|
{-F,-E, E },
|
287
|
{ F,-E, E },
|
288
|
{-E,-F, E },
|
289
|
{-E, F, E },
|
290
|
{ E, E,-F },
|
291
|
{ E, E, F },
|
292
|
{ E,-E,-F },
|
293
|
{ E,-E, F },
|
294
|
{-E,-E,-F },
|
295
|
{-E,-E, F },
|
296
|
{-E, E,-F },
|
297
|
{-E, E, F },
|
298
|
{-F, E,-E },
|
299
|
{ F, E,-E },
|
300
|
{ E,-F,-E },
|
301
|
{ E, F,-E },
|
302
|
{-F,-E,-E },
|
303
|
{ F,-E,-E },
|
304
|
{-E,-F,-E },
|
305
|
{-E, F,-E },
|
306
|
|
307
|
{ 0, F, E },
|
308
|
{ 0,-F, E },
|
309
|
{ F, 0, E },
|
310
|
{-F, 0, E },
|
311
|
{ 0, F,-E },
|
312
|
{ 0,-F,-E },
|
313
|
{ F, 0,-E },
|
314
|
{-F, 0,-E },
|
315
|
{ E, 0, F },
|
316
|
{ E, 0,-F },
|
317
|
{ E, F, 0 },
|
318
|
{ E,-F, 0 },
|
319
|
{-E, 0, F },
|
320
|
{-E, 0,-F },
|
321
|
{-E, F, 0 },
|
322
|
{-E,-F, 0 },
|
323
|
|
324
|
{ 0,-E, F },
|
325
|
{ 0,-E,-F },
|
326
|
{ F,-E, 0 },
|
327
|
{-F,-E, 0 },
|
328
|
{ 0, E, F },
|
329
|
{ 0, E,-F },
|
330
|
{ F, E, 0 },
|
331
|
{-F, E, 0 },
|
332
|
};
|
333
|
}
|
334
|
}
|
335
|
|
336
|
return mPosition;
|
337
|
}
|
338
|
|
339
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
340
|
|
341
|
public Static4D getCubitQuats(int cubit, int[] numLayers)
|
342
|
{
|
343
|
if( mQuatIndex==null ) mQuatIndex = new int[] { 0,2,10,8,1,4,6,7,11,5,9,3, 0,11,2,3,4,1 };
|
344
|
|
345
|
switch(cubit)
|
346
|
{
|
347
|
case 0: return mObjectQuats[0]; // unit quat
|
348
|
case 1: return new Static4D( SQ2/2,0,0,SQ2/2); // 90 along X
|
349
|
case 2: return new Static4D(-SQ2/2,0,0,SQ2/2); // -90 along X
|
350
|
case 3: return mObjectQuats[9]; // 180 along X
|
351
|
case 4: return new Static4D(0, SQ2/2,0,SQ2/2); // 90 along Y
|
352
|
case 5: return mObjectQuats[11]; // 180 along Y
|
353
|
case 6: return mObjectQuats[10]; // 180 along Z
|
354
|
case 7: return new Static4D(SQ2/2,0,-SQ2/2,0); // 180 along (SQ2/2,0,-SQ2/2)
|
355
|
default: int index = numLayers[0]==3 ? (cubit-8) : (cubit<32 ? (cubit-8)/2 : (cubit-32)/4 + 12);
|
356
|
return mObjectQuats[mQuatIndex[index]];
|
357
|
}
|
358
|
}
|
359
|
|
360
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
361
|
|
362
|
private float[][] getVertices(int variant)
|
363
|
{
|
364
|
float A = getNumLayers()[0]==3 ? 0.5f : 5.0f/8;
|
365
|
float B = 2*A;
|
366
|
float C = 3*A;
|
367
|
|
368
|
if( variant==0 )
|
369
|
{
|
370
|
return new float[][]
|
371
|
{
|
372
|
{ 0, 0, 0 },
|
373
|
{-A, A, A },
|
374
|
{-A,-A, A },
|
375
|
{ A, A, A },
|
376
|
{ A,-A, A },
|
377
|
{ A, A,-A },
|
378
|
{ A,-A,-A },
|
379
|
{-A, A,-A },
|
380
|
};
|
381
|
}
|
382
|
else if( variant==1 )
|
383
|
{
|
384
|
return new float[][]
|
385
|
{
|
386
|
{-A, 0, 0},
|
387
|
{ A, 0, 0},
|
388
|
{-A,-B, 0},
|
389
|
{ A,-B, 0},
|
390
|
{ 0,-C, 0},
|
391
|
{-A, 0,-B},
|
392
|
{ A, 0,-B},
|
393
|
{ 0, 0,-C},
|
394
|
};
|
395
|
}
|
396
|
else
|
397
|
{
|
398
|
return new float[][]
|
399
|
{
|
400
|
{-A, 0, 0},
|
401
|
{ 0,-A, 0},
|
402
|
{ A, 0, 0},
|
403
|
{ 0, A, 0},
|
404
|
{ 0, 0,-A}
|
405
|
};
|
406
|
}
|
407
|
}
|
408
|
|
409
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
410
|
|
411
|
public ObjectShape getObjectShape(int variant)
|
412
|
{
|
413
|
if( variant==0 )
|
414
|
{
|
415
|
int[][] indices =
|
416
|
{
|
417
|
{ 2,4,3,1 },
|
418
|
{ 1,3,5,7 },
|
419
|
{ 4,6,5,3 },
|
420
|
|
421
|
{ 0,4,2 },
|
422
|
{ 0,7,5 },
|
423
|
{ 0,6,4 },
|
424
|
{ 0,1,7 },
|
425
|
{ 0,2,1 },
|
426
|
{ 0,5,6 }
|
427
|
};
|
428
|
|
429
|
return new ObjectShape(getVertices(variant), indices);
|
430
|
}
|
431
|
else if( variant==1 )
|
432
|
{
|
433
|
int[][] indices =
|
434
|
{
|
435
|
{ 0,2,4,3,1 },
|
436
|
{ 0,1,6,7,5 },
|
437
|
{ 1,3,6 },
|
438
|
{ 5,2,0 },
|
439
|
{ 4,7,6,3 },
|
440
|
{ 2,5,7,4 }
|
441
|
};
|
442
|
|
443
|
return new ObjectShape(getVertices(variant), indices);
|
444
|
}
|
445
|
else
|
446
|
{
|
447
|
int[][] indices = { {0,1,2,3},{4,1,0},{4,2,1},{4,3,2},{4,0,3} };
|
448
|
return new ObjectShape(getVertices(variant), indices);
|
449
|
}
|
450
|
}
|
451
|
|
452
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
453
|
|
454
|
public ObjectFaceShape getObjectFaceShape(int variant)
|
455
|
{
|
456
|
int numL = getNumLayers()[0];
|
457
|
|
458
|
if( variant==0 )
|
459
|
{
|
460
|
int N = numL==3 ? 5:4;
|
461
|
int E = numL==3 ? 1:0;
|
462
|
float h1 = isInIconMode() ? 0.001f : 0.06f;
|
463
|
float h2 = isInIconMode() ? 0.001f : 0.01f;
|
464
|
float[][] bands = { {h1,35,0.5f,0.7f,N,E,E}, {h2,35,0.2f,0.4f,N,E,E} };
|
465
|
int[] indices = { 0,0,0,1,1,1,1,1,1 };
|
466
|
return new ObjectFaceShape(bands,indices,null);
|
467
|
}
|
468
|
else if( variant==1 )
|
469
|
{
|
470
|
int N = numL==3 ? 6:5;
|
471
|
int E = numL==3 ? 1:0;
|
472
|
float h1 = isInIconMode() ? 0.001f : 0.038f;
|
473
|
float h2 = isInIconMode() ? 0.001f : 0.020f;
|
474
|
float[][] bands = { {h1,35,0.250f,0.7f,N,E,E}, {h2,35,0.125f,0.2f,3,E,E}, {h2,35,0.125f,0.2f,3,E,E} };
|
475
|
int[] indices = { 0,0,1,1,2,2 };
|
476
|
return new ObjectFaceShape(bands,indices,null);
|
477
|
}
|
478
|
else
|
479
|
{
|
480
|
int N1 = numL==3 ? 6:2;
|
481
|
int N2 = numL==3 ? 3:2;
|
482
|
int E = numL==3 ? 1:0;
|
483
|
float height = isInIconMode() ? 0.001f : 0.04f;
|
484
|
float[][] bands = { {height,35,SQ2/8,0.9f,N1,E,E}, {0.001f,35,1,0.0f,N2,0,0} };
|
485
|
int[] indices = { 0,1,1,1,1 };
|
486
|
return new ObjectFaceShape(bands,indices,null);
|
487
|
}
|
488
|
}
|
489
|
|
490
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
491
|
|
492
|
public ObjectVertexEffects getVertexEffects(int variant)
|
493
|
{
|
494
|
if( variant==0 )
|
495
|
{
|
496
|
float[][] corners = { {0.06f,0.12f} };
|
497
|
int[] indices = { -1,0,-1,0,0,0,-1,-1 };
|
498
|
float[][] centers = { { 0.0f, 0.0f, 0.0f} };
|
499
|
return FactoryCubit.generateVertexEffect(getVertices(variant),corners,indices,centers,indices);
|
500
|
}
|
501
|
else if( variant==1 )
|
502
|
{
|
503
|
float[][] corners = { {0.06f,0.20f} };
|
504
|
int[] indices = { 0,0,-1,-1,-1,-1,-1,-1 };
|
505
|
float[][] centers = { { 0.0f,-0.75f,-0.75f} };
|
506
|
return FactoryCubit.generateVertexEffect(getVertices(variant),corners,indices,centers,indices);
|
507
|
}
|
508
|
else
|
509
|
{
|
510
|
return null;
|
511
|
}
|
512
|
}
|
513
|
|
514
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
515
|
|
516
|
public int getNumCubitVariants(int[] numLayers)
|
517
|
{
|
518
|
return numLayers[0]==3 ? 2 : 3;
|
519
|
}
|
520
|
|
521
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
522
|
|
523
|
public int getCubitVariant(int cubit, int[] numLayers)
|
524
|
{
|
525
|
switch( numLayers[0] )
|
526
|
{
|
527
|
case 3: return cubit<8 ? 0:1;
|
528
|
case 5: return cubit<8 ? 0 : cubit<32 ? 1:2;
|
529
|
}
|
530
|
return 0;
|
531
|
}
|
532
|
|
533
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
534
|
|
535
|
public float getStickerRadius()
|
536
|
{
|
537
|
return 0.09f;
|
538
|
}
|
539
|
|
540
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
541
|
|
542
|
public float getStickerStroke()
|
543
|
{
|
544
|
switch(getNumLayers()[0])
|
545
|
{
|
546
|
case 3: return isInIconMode() ? 0.20f : 0.09f;
|
547
|
case 5: return isInIconMode() ? 0.30f : 0.12f;
|
548
|
}
|
549
|
|
550
|
return 0;
|
551
|
}
|
552
|
|
553
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
554
|
|
555
|
public float[][][] getStickerAngles()
|
556
|
{
|
557
|
return null;
|
558
|
}
|
559
|
|
560
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
561
|
// PUBLIC API
|
562
|
|
563
|
public Static3D[] getRotationAxis()
|
564
|
{
|
565
|
return ROT_AXIS;
|
566
|
}
|
567
|
|
568
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
569
|
|
570
|
public int[][] getBasicAngles()
|
571
|
{
|
572
|
if( mBasicAngle==null )
|
573
|
{
|
574
|
int num = getNumLayers()[0];
|
575
|
int[] tmp = new int[num];
|
576
|
for(int i=0; i<num; i++) tmp[i] = 3;
|
577
|
mBasicAngle = new int[][] { tmp,tmp,tmp,tmp };
|
578
|
}
|
579
|
|
580
|
return mBasicAngle;
|
581
|
}
|
582
|
|
583
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
584
|
|
585
|
public String getShortName()
|
586
|
{
|
587
|
switch(getNumLayers()[0])
|
588
|
{
|
589
|
case 3: return ListObjects.REDI_3.name();
|
590
|
case 5: return ListObjects.FADI_5.name();
|
591
|
}
|
592
|
|
593
|
return null;
|
594
|
}
|
595
|
|
596
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
597
|
|
598
|
public String[][] getTutorials()
|
599
|
{
|
600
|
switch(getNumLayers()[0])
|
601
|
{
|
602
|
case 3: return new String[][] {
|
603
|
{"gb", "Qn7TJED6O-4", "How to Solve the MoYu Redi Cube", "Z3"},
|
604
|
{"es", "g0M38Aotgac", "Resolver Redi Cube", "Cuby"},
|
605
|
{"ru", "dlNRbE-hyzU", "Как собрать Реди Куб", "Алексей Ярыгин"},
|
606
|
{"fr", "zw7UZcqqsgA", "Comment résoudre le Redi Cube", "ValentinoCube"},
|
607
|
{"de", "YU8riouyC2w", "Redi Cube Solve", "CubaroCubing"},
|
608
|
{"pl", "vxo3lXMsWQI", "Jak ułożyć Redi Cube?", "DJ rubiks"},
|
609
|
{"br", "muQ8U_G4LmM", "Como resolver o Redi Cube", "Rafael Cinoto"},
|
610
|
{"kr", "a5CzDMbRzbY", "레디큐브를 배우기", "vincentcube"},
|
611
|
{"vn", "2JZxtmrKUn4", "Tutorial N.6 - Redi", "Duy Thích Rubik"},
|
612
|
{"tw", "LBKPL01IHD8", "Redi Cube盲解教學", "1hrBLD"},
|
613
|
};
|
614
|
case 5: return new String[][]{
|
615
|
{"gb", "Lp63Pn6q4vM", "Mosaic Cube", "Cubes made Easy"},
|
616
|
{"gb", "LGrxmaTiCZM", "How to solve the Mosaic Cube", "Cuber Stu"},
|
617
|
{"es", "o5_7dezogqM", "Resolver Mosaic Cube 1/4", "TheMaoiSha"},
|
618
|
{"es", "wT4wwCOfvQc", "Resolver Mosaic Cube 2/4", "TheMaoiSha"},
|
619
|
{"es", "yLdSbIK0ULU", "Resolver Mosaic Cube 3/4", "TheMaoiSha"},
|
620
|
{"es", "l_wl0AgP48k", "Resolver Mosaic Cube 4/4", "TheMaoiSha"},
|
621
|
{"ru", "wbbP45jHsU4", "Как собрать Мозаичный Куб", "SOLPUZ-Димон"},
|
622
|
{"pl", "Iu5vd_4h3Uc", "Mosaic cube Tutorial PL", "MrUK"},
|
623
|
{"br", "a-WiaZdlfjQ", "Mosaic Cube Walkthrough Solve", "Cubo vício"},
|
624
|
{"tw", "m0vG-cRB8fo", "Mosaic Cube Solution 1/2", "Arwin Hsu"},
|
625
|
{"tw", "qUDC4TF_1cw", "Mosaic Cube Solution 2/2", "Arwin Hsu"},
|
626
|
};
|
627
|
}
|
628
|
return null;
|
629
|
}
|
630
|
}
|