Revision bdbbb4c5
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistySquare2.java | ||
---|---|---|
21 | 21 |
|
22 | 22 |
import android.content.res.Resources; |
23 | 23 |
|
24 |
import org.distorted.helpers.ObjectShape;
|
|
25 |
import org.distorted.helpers.ObjectSticker;
|
|
26 |
import org.distorted.helpers.ScrambleState;
|
|
24 |
import org.distorted.objectlb.ObjectShape;
|
|
25 |
import org.distorted.objectlb.ObjectSticker;
|
|
26 |
import org.distorted.objectlb.ScrambleState;
|
|
27 | 27 |
import org.distorted.library.main.DistortedEffects; |
28 | 28 |
import org.distorted.library.main.DistortedTexture; |
29 | 29 |
import org.distorted.library.mesh.MeshSquare; |
30 | 30 |
import org.distorted.library.type.Static4D; |
31 | 31 |
import org.distorted.main.R; |
32 |
import org.distorted.objectlb.ObjectList; |
|
32 | 33 |
|
33 | 34 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
34 | 35 |
|
35 |
class TwistySquare2 extends TwistySquare |
|
36 |
public class TwistySquare2 extends TwistySquare
|
|
36 | 37 |
{ |
37 | 38 |
private static final int NUM_STICKERS = 6; |
38 | 39 |
|
... | ... | |
45 | 46 |
|
46 | 47 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
47 | 48 |
|
48 |
TwistySquare2(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh, |
|
49 |
DistortedEffects effects, int[][] moves, Resources res, int scrWidth) |
|
49 |
public TwistySquare2(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
50 |
DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
|
|
50 | 51 |
{ |
51 | 52 |
super(size, quat, texture, mesh, effects, moves, ObjectList.SQU2, res, scrWidth); |
52 | 53 |
} |
53 | 54 |
|
54 | 55 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
55 | 56 |
|
56 |
ScrambleState[] getScrambleStates() |
|
57 |
protected ScrambleState[] getScrambleStates()
|
|
57 | 58 |
{ |
58 | 59 |
if( mStates==null ) |
59 | 60 |
{ |
... | ... | |
78 | 79 |
|
79 | 80 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
80 | 81 |
|
81 |
int[] getSolvedQuats(int cubit, int numLayers) |
|
82 |
protected int[] getSolvedQuats(int cubit, int numLayers)
|
|
82 | 83 |
{ |
83 | 84 |
return null; |
84 | 85 |
} |
85 | 86 |
|
86 | 87 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
87 | 88 |
|
88 |
ObjectShape getObjectShape(int cubit, int numLayers) |
|
89 |
protected ObjectShape getObjectShape(int cubit, int numLayers)
|
|
89 | 90 |
{ |
90 | 91 |
int variant = getCubitVariant(cubit,numLayers); |
91 | 92 |
|
... | ... | |
182 | 183 |
|
183 | 184 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
184 | 185 |
|
185 |
Static4D getQuat(int cubit, int numLayers) |
|
186 |
protected Static4D getQuat(int cubit, int numLayers)
|
|
186 | 187 |
{ |
187 | 188 |
if( mQuats==null ) initializeQuats(); |
188 | 189 |
|
... | ... | |
202 | 203 |
|
203 | 204 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
204 | 205 |
|
205 |
int getNumCubitVariants(int numLayers) |
|
206 |
protected int getNumCubitVariants(int numLayers)
|
|
206 | 207 |
{ |
207 | 208 |
return 3; |
208 | 209 |
} |
209 | 210 |
|
210 | 211 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
211 | 212 |
|
212 |
int getCubitVariant(int cubit, int numLayers) |
|
213 |
protected int getCubitVariant(int cubit, int numLayers)
|
|
213 | 214 |
{ |
214 | 215 |
return cubit<2 ? 0 : (cubit<10 ? 1:2); |
215 | 216 |
} |
216 | 217 |
|
217 | 218 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
218 | 219 |
|
219 |
ObjectSticker retSticker(int face) |
|
220 |
protected ObjectSticker retSticker(int face)
|
|
220 | 221 |
{ |
221 | 222 |
if( mStickers==null ) |
222 | 223 |
{ |
... | ... | |
252 | 253 |
|
253 | 254 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
254 | 255 |
|
255 |
float[][] getCubitPositions(int numLayers) |
|
256 |
protected float[][] getCubitPositions(int numLayers)
|
|
256 | 257 |
{ |
257 | 258 |
if( mCenters ==null ) |
258 | 259 |
{ |
... | ... | |
297 | 298 |
|
298 | 299 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
299 | 300 |
|
300 |
int getSolvedFunctionIndex() |
|
301 |
protected int getSolvedFunctionIndex()
|
|
301 | 302 |
{ |
302 | 303 |
return 3; |
303 | 304 |
} |
304 | 305 |
|
305 | 306 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
306 | 307 |
|
307 |
int getNumStickerTypes(int numLayers) |
|
308 |
protected int getNumStickerTypes(int numLayers)
|
|
308 | 309 |
{ |
309 | 310 |
return NUM_STICKERS; |
310 | 311 |
} |
311 | 312 |
|
312 | 313 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
313 | 314 |
|
314 |
int getFaceColor(int cubit, int cubitface, int numLayers) |
|
315 |
protected int getFaceColor(int cubit, int cubitface, int numLayers)
|
|
315 | 316 |
{ |
316 | 317 |
if( mStickerColor==null ) |
317 | 318 |
{ |
Also available in: Unified diff
Refactoring: split the 'objects' package into two, 'objects' and 'objectlib'.
The point: we're going to need to move the 'objectlib' stuff into its own library module, and that's because we're going to create a new app module which needs access to it.