Revision fb1e9a31
Added by Leszek Koltunski 12 months ago
src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java | ||
---|---|---|
50 | 50 |
super(meshState, iconMode, data.getNumLayers()[0], quat, move, scale, data, asset); |
51 | 51 |
} |
52 | 52 |
|
53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
54 |
|
|
55 |
@Override |
|
56 |
public float[][] returnRotationFactor() |
|
57 |
{ |
|
58 |
int numL= getNumLayers()[0]; |
|
59 |
float[][] factor = new float[4][numL]; |
|
60 |
|
|
61 |
for(int ax=0; ax<4; ax++) |
|
62 |
for(int la=0; la<numL; la++) factor[ax][la] = ((float)numL)/(numL-la); |
|
63 |
|
|
64 |
return factor; |
|
65 |
} |
|
66 |
|
|
53 | 67 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
54 | 68 |
// edge[i] is the state after moving layer i (0 is the largest) |
55 | 69 |
|
Also available in: Unified diff
move the returnRotationFactor() method from touchControl to TwistyObject (where it can be overridden)