Revision bf890718
Added by Leszek Koltunski over 2 years ago
| src/main/java/org/distorted/objectlib/tablebases/TablebasesPyraminx.java | ||
|---|---|---|
| 72 | 72 |              { 0.5f, SQ2/4, 0.0f},
 | 
| 73 | 73 |  | 
| 74 | 74 |              { 0.0f,-SQ2/2, 0.0f},
 | 
| 75 |              { 0.0f,-SQ2/2, 0.0f},
 | |
| 76 |              { 0.0f,-SQ2/2, 0.0f},
 | |
| 77 |              { 0.0f,-SQ2/2, 0.0f},
 | |
| 78 |              { 0.0f,-SQ2/2, 0.0f},
 | |
| 79 |              { 0.0f,-SQ2/2, 0.0f},
 | |
| 80 |  | |
| 81 | /* | |
| 75 | 82 |              { 0.5f,  0.0f,-0.5f},
 | 
| 76 | 83 |              { 0.5f,  0.0f, 0.5f},
 | 
| 77 | 84 |              {-0.5f,  0.0f,-0.5f},
 | 
| 78 | 85 |              {-0.5f,  0.0f, 0.5f},
 | 
| 79 | 86 |              { 0.0f, SQ2/2, 0.0f},
 | 
| 87 | */ | |
| 80 | 88 | }; | 
| 81 | 89 | } | 
| 82 | 90 |  | 
| ... | ... | |
| 147 | 155 | int p = perm[i]; | 
| 148 | 156 | int t = twist%2; | 
| 149 | 157 | twist/=2; | 
| 150 | output[i] = EDGE_QUATS[p][t]; | |
| 158 |       output[i+4] = EDGE_QUATS[p][t];
 | |
| 151 | 159 | } | 
| 152 | 160 | } | 
| 153 | 161 |  | 
| ... | ... | |
| 240 | 248 | int edgeTwist = twist[0]+ 2*(twist[1]+ 2*(twist[2]+ 2*(twist[3]+ 2*twist[4]))); | 
| 241 | 249 | int perm_num = TablebaseHelpers.computeEvenPermutationNum(permutation); | 
| 242 | 250 |  | 
| 251 | int ret = vertexTwist + 81*(edgeTwist + 32*perm_num); | |
| 252 |  | |
| 253 | if( ret<0 || ret>=933120 ) | |
| 254 |   {
 | |
| 255 |   android.util.Log.e("D", "vertexTwist="+vertexTwist+" edgeTwist="+edgeTwist+" perm_num="+perm_num);
 | |
| 256 |   android.util.Log.e("D", "perm: "+permutation[0]+" "+permutation[1]+" "+permutation[2]+" "+permutation[3]+" "+permutation[4]+" "+permutation[5]);
 | |
| 257 |   android.util.Log.e("D", "quat: "+quats[4]+" "+quats[5]+" "+quats[6]+" "+quats[7]+" "+quats[8]+" "+quats[9]);
 | |
| 258 | } | |
| 259 |  | |
| 243 | 260 | return vertexTwist + 81*(edgeTwist + 32*perm_num); | 
| 244 | 261 | } | 
| 245 | 262 | } | 
Also available in: Unified diff
Pyraminx solver: progress