Revision 92ec91b9
Added by Leszek Koltunski about 3 years ago
src/main/java/org/distorted/objects/TwistyBandagedAbstract.java | ||
---|---|---|
303 | 303 |
int multiplier = (face%2)==0 ? 1:-1; |
304 | 304 |
int posIndex = face/2; |
305 | 305 |
int dimIndex = mAxisMap[posIndex][quatIndex]; |
306 |
boolean reaches = multiplier*pos[posIndex] + dim[dimIndex]*0.5f > (numLayers-1)*0.5f; |
|
306 |
|
|
307 |
float position = 0.0f; |
|
308 |
int len = pos.length/3; |
|
309 |
for(int i=0; i<len; i++) position += pos[3*i+posIndex]; |
|
310 |
position /= len; |
|
311 |
|
|
312 |
boolean reaches = multiplier*position + dim[dimIndex]*0.5f > (numLayers-1)*0.5f; |
|
307 | 313 |
|
308 | 314 |
return reaches ? stickerIndex*NUM_FACES + face : NUM_STICKERS*NUM_FACES; |
309 | 315 |
} |
Also available in: Unified diff
Progress with bandaged objects.