Revision 42d4da8c
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/objectlib/helpers/ObjectSignature.java | ||
---|---|---|
93 | 93 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
94 | 94 |
// a cube of size N has 12*(N-1)^2 possible places two adjacent cubies can be 'glued'; therefore |
95 | 95 |
// the signature must contain ceil( 12*(N-1)^2 / 64 ) bytes. |
96 |
// a pyraminx of size N has 4 + 6*(N-1)(N-2) places two adjacent cubies can be 'glued' so much less.
|
|
96 |
// a Pyraminx of size N has 4 + 6*(N-1)(N-2) places two adjacent cubies can be 'glued' so much less.
|
|
97 | 97 |
|
98 | 98 |
// Gigaminx has 540 such places (so more if N<=7) |
99 | 99 |
|
... | ... | |
364 | 364 |
|
365 | 365 |
if( areNeighboursMegaminx(param,xi-xj,yi-yj,zi-zj) ) |
366 | 366 |
{ |
367 |
float xc = (xi+xj)/2; // TODO |
|
368 |
float yc = (yi+yj)/2; |
|
369 |
float zc = (zi+zj)/2; |
|
367 |
float xc = (xi+xj)/2; // TODO; wrong; consequence of this is: mTouchRows
|
|
368 |
float yc = (yi+yj)/2; // in case of Megaminx and larger - not Kilominx -
|
|
369 |
float zc = (zi+zj)/2; // are wrong, and scrambling is not so perfect.
|
|
370 | 370 |
|
371 | 371 |
int bitIndex = getIndexOfCubitTouch(xc,yc,zc); |
372 | 372 |
setBit(bitIndex,1); |
... | ... | |
1056 | 1056 |
|
1057 | 1057 |
if( areNeighboursMegaminx(size, ox-tx, oy-ty, oz-tz) ) |
1058 | 1058 |
{ |
1059 |
float xc = (tx+ox)/2; // TODO; wrong |
|
1060 |
float yc = (ty+oy)/2; |
|
1061 |
float zc = (tz+oz)/2; |
|
1059 |
float xc = (tx+ox)/2; // TODO; wrong; consequence of this is: mTouchRows
|
|
1060 |
float yc = (ty+oy)/2; // in case of Megaminx and larger - not Kilominx -
|
|
1061 |
float zc = (tz+oz)/2; // are wrong, and scrambling is not so perfect.
|
|
1062 | 1062 |
|
1063 | 1063 |
float[] t = new float[] {xc, yc, zc}; |
1064 | 1064 |
touch.add(t); |
Also available in: Unified diff
comments