44 |
44 |
private float[][] mCuts;
|
45 |
45 |
private float[][] mPositions;
|
46 |
46 |
private int[] mQuatIndex;
|
|
47 |
private boolean[][] mRotatable;
|
47 |
48 |
|
48 |
49 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
49 |
50 |
|
... | ... | |
67 |
68 |
|
68 |
69 |
public int[][] getScrambleEdges()
|
69 |
70 |
{
|
70 |
|
if( mEdges==null ) mEdges = ScrambleEdgeGenerator.getScrambleEdgesSingle(mBasicAngle);
|
|
71 |
if( mEdges==null )
|
|
72 |
{
|
|
73 |
mEdges = new int[][]
|
|
74 |
{
|
|
75 |
{ 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
|
|
76 |
|
|
77 |
{ 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
|
|
78 |
{ 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
|
|
79 |
{ 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
|
|
80 |
{ 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
|
|
81 |
{ 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
|
|
82 |
{ 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
|
|
83 |
{ 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
|
|
84 |
{ 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
|
|
85 |
|
|
86 |
{ 12,2,13,2, 20,3,21,3, 26,5,27,5, }, // 9
|
|
87 |
{ 4,1,5,1, 18,6,19,6, 28,4,29,4, }, // 10
|
|
88 |
{ 4,1,5,1, 10,7,11,7, 28,4,29,4, }, // 11
|
|
89 |
{ 2,8,3,8, 12,2,13,2, 20,3,21,3, }, // 12
|
|
90 |
{ 4,1,5,1, 10,7,11,7, 18,6,19,6, }, // 13
|
|
91 |
{ 2,8,3,8, 12,2,13,2, 26,5,27,5, }, // 14
|
|
92 |
{ 2,8,3,8, 20,3,21,3, 26,5,27,5, }, // 15
|
|
93 |
{ 10,7,11,7, 18,6,19,6, 28,4,29,4, }, // 16
|
|
94 |
};
|
|
95 |
}
|
|
96 |
|
71 |
97 |
return mEdges;
|
72 |
98 |
}
|
73 |
99 |
|
|
100 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
101 |
|
|
102 |
@Override
|
|
103 |
public int[][] getScrambleAlgorithms()
|
|
104 |
{
|
|
105 |
if( mRotatable==null ) createRotatable();
|
|
106 |
return ScrambleEdgeGenerator.getScramblingAlgorithms(mBasicAngle, mRotatable);
|
|
107 |
}
|
|
108 |
|
74 |
109 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
75 |
110 |
|
76 |
111 |
public float[][] getCuts(int[] numLayers)
|
... | ... | |
87 |
122 |
|
88 |
123 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
89 |
124 |
|
90 |
|
public boolean[][] getLayerRotatable(int[] numLayers)
|
|
125 |
private void createRotatable()
|
91 |
126 |
{
|
92 |
127 |
boolean[] tmp = new boolean[] {true,true,false,true,true};
|
93 |
|
return new boolean[][] { tmp,tmp,tmp,tmp };
|
|
128 |
mRotatable = new boolean[][] { tmp,tmp,tmp,tmp };
|
|
129 |
}
|
|
130 |
|
|
131 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
132 |
|
|
133 |
public boolean[][] getLayerRotatable(int[] numLayers)
|
|
134 |
{
|
|
135 |
if( mRotatable==null ) createRotatable();
|
|
136 |
return mRotatable;
|
94 |
137 |
}
|
95 |
138 |
|
96 |
139 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
... | ... | |
218 |
261 |
{
|
219 |
262 |
if( variant==0 )
|
220 |
263 |
{
|
221 |
|
int N = 6;
|
|
264 |
int N = 4;
|
222 |
265 |
int E = 1;
|
223 |
266 |
float height = isInIconMode() ? 0.001f : 0.04f;
|
224 |
267 |
float[][] bands = { {height,35,SQ2/8,0.9f,N,E,E}, {0.001f,35,1,0.0f,3,0,0} };
|
... | ... | |
243 |
286 |
{
|
244 |
287 |
if( variant==0 )
|
245 |
288 |
{
|
246 |
|
float[][] corners = { {0.06f,0.15f} };
|
|
289 |
final float C = 1.25f;
|
|
290 |
float[][] corners = { {0.03f,0.15f} };
|
247 |
291 |
int[] cornerIndices = { 0,0,0,0,0 };
|
248 |
|
float[][] centers = { {0,0,-0.4f} };
|
249 |
|
int[] centerIndices = { 0,0,0,0,-1 };
|
250 |
|
return FactoryCubit.generateVertexEffect(getVertices(variant),corners,cornerIndices,centers,centerIndices);
|
|
292 |
float[][] centers = { {-C,0,-C},{0,-C,-C},{C,0,-C},{0,C,-C} };
|
|
293 |
int[] centerIndices = { 0,1,2,3,-1 };
|
|
294 |
return FactoryCubit.generateVertexEffect(getVertices(variant),corners,cornerIndices,centers,centerIndices);
|
251 |
295 |
}
|
252 |
296 |
else
|
253 |
297 |
{
|
... | ... | |
354 |
398 |
|
355 |
399 |
public int getComplexity()
|
356 |
400 |
{
|
357 |
|
return 1;
|
|
401 |
return 2;
|
358 |
402 |
}
|
359 |
403 |
|
360 |
404 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
improve scrambling of the Tins and Lattice Cubes.