Revision a57e6870
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistySquare.java | ||
---|---|---|
64 | 64 |
|
65 | 65 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
66 | 66 |
|
67 |
TwistySquare(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
67 |
TwistySquare(int[] numL, Static4D quat, Static3D move, DistortedTexture texture,
|
|
68 | 68 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth) |
69 | 69 |
{ |
70 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
70 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
71 | 71 |
} |
72 | 72 |
|
73 | 73 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
128 | 128 |
|
129 | 129 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
130 | 130 |
|
131 |
protected float[][] getCuts(int numLayers) |
|
131 |
protected float[][] getCuts(int[] numLayers)
|
|
132 | 132 |
{ |
133 | 133 |
if( mCuts==null ) |
134 | 134 |
{ |
... | ... | |
140 | 140 |
|
141 | 141 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
142 | 142 |
|
143 |
private void getLayerRotatable(int numLayers) |
|
143 |
private void getLayerRotatable(int[] numLayers)
|
|
144 | 144 |
{ |
145 | 145 |
if( mLayerRotatable==null ) |
146 | 146 |
{ |
... | ... | |
162 | 162 |
{ |
163 | 163 |
if( mMovement==null ) |
164 | 164 |
{ |
165 |
int numLayers = getNumLayers(); |
|
165 |
int[] numLayers = getNumLayers();
|
|
166 | 166 |
if( mCuts==null ) getCuts(numLayers); |
167 | 167 |
getLayerRotatable(numLayers); |
168 |
mMovement = new Movement6(ROT_AXIS,mCuts,mLayerRotatable,numLayers,TYPE_NOT_SPLIT,ENABLED); |
|
168 |
mMovement = new Movement6(ROT_AXIS,mCuts,mLayerRotatable,numLayers[0],TYPE_NOT_SPLIT,ENABLED);
|
|
169 | 169 |
} |
170 | 170 |
return mMovement; |
171 | 171 |
} |
Also available in: Unified diff
make numLayers into an int[] (preparation for Cuboids)
Caution: because of previous changes to cubit order in cube, the Solver is broken!