Revision d2ea2873
Added by Leszek Koltunski 8 months ago
src/main/java/org/distorted/objectlib/main/TwistyObjectWithStickers.java | ||
---|---|---|
635 | 635 |
|
636 | 636 |
for(int f=0; f<numFaces; f++) |
637 | 637 |
{ |
638 |
if( origSticker[f]>=0 ) |
|
638 |
int orig = origSticker[f]; |
|
639 |
|
|
640 |
if( orig>=0 ) |
|
639 | 641 |
{ |
640 | 642 |
float[] c = centers[cubit][f]; |
641 | 643 |
QuatHelper.rotateVectorByQuat(tmp,c[0],c[1],c[2],1.0f,quat); |
... | ... | |
645 | 647 |
{ |
646 | 648 |
targetCubit = cubitFace>>8; |
647 | 649 |
int targetFace = cubitFace&0xff; |
648 |
if( currSticker[targetCubit][f] != origSticker[targetFace] ) return -1;
|
|
650 |
if( currSticker[targetCubit][targetFace] != orig ) return -1;
|
|
649 | 651 |
} |
650 | 652 |
else return -1; |
651 | 653 |
} |
... | ... | |
665 | 667 |
if( mapsTo>=0 && !taken[mapsTo] ) |
666 | 668 |
{ |
667 | 669 |
taken[mapsTo] = true; |
668 |
return getInvertedQuat(q);
|
|
670 |
return q;
|
|
669 | 671 |
} |
670 | 672 |
} |
671 | 673 |
|
Also available in: Unified diff
progress with Algorithmic solvers. Seem to solve all right now; but still problems with which cubits it lights.