Revision ba6d9ee9
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/main/Movement.java | ||
---|---|---|
61 | 61 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
62 | 62 |
|
63 | 63 |
Movement(Static3D[] rotAxis, Static3D[] faceAxis, float[][] cuts, boolean[][] rotatable, |
64 |
float distance3D, int size, int type, int[][][] enabled)
|
|
64 |
float distance3D, float size, int type, int[][][] enabled)
|
|
65 | 65 |
{ |
66 | 66 |
mPoint = new float[3]; |
67 | 67 |
mCamera= new float[3]; |
... | ... | |
268 | 268 |
|
269 | 269 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
270 | 270 |
|
271 |
private float[] computeBorder(float[] cuts, boolean[] rotatable, int size)
|
|
271 |
private float[] computeBorder(float[] cuts, boolean[] rotatable, float size)
|
|
272 | 272 |
{ |
273 | 273 |
if( cuts==null ) return null; |
274 | 274 |
|
... | ... | |
306 | 306 |
} |
307 | 307 |
|
308 | 308 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
309 |
// size, not numLayers (see Master Skewb where size!=numLayers) |
|
309 |
// size, not numLayers (see Master Skewb where size!=numLayers) - also cuboids.
|
|
310 | 310 |
|
311 |
void computeBorders(float[][] cuts, boolean[][] rotatable, int size)
|
|
311 |
void computeBorders(float[][] cuts, boolean[][] rotatable, float size)
|
|
312 | 312 |
{ |
313 | 313 |
int numCuts = cuts.length; |
314 | 314 |
mTouchBorders = new float[numCuts][]; |
315 | 315 |
|
316 |
for(int i=0; i<numCuts; i++)
|
|
316 |
for(int axis=0; axis<numCuts; axis++)
|
|
317 | 317 |
{ |
318 |
mTouchBorders[i] = computeBorder(cuts[i],rotatable[i],size);
|
|
318 |
mTouchBorders[axis] = computeBorder(cuts[axis],rotatable[axis],size);
|
|
319 | 319 |
} |
320 | 320 |
} |
321 | 321 |
|
Also available in: Unified diff
Cuboids