Revision efa81f0c
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyJing.java | ||
---|---|---|
33 | 33 |
|
34 | 34 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
35 | 35 |
|
36 |
public class TwistyJing extends TwistyObject
|
|
36 |
public class TwistyJing extends Twisty4
|
|
37 | 37 |
{ |
38 | 38 |
static final Static3D[] ROT_AXIS = new Static3D[] |
39 | 39 |
{ |
... | ... | |
43 | 43 |
new Static3D(-SQ6/3,+SQ3/3, 0), |
44 | 44 |
}; |
45 | 45 |
|
46 |
private static final int[] FACE_COLORS = new int[] |
|
47 |
{ |
|
48 |
COLOR_GREEN , COLOR_YELLOW, |
|
49 |
COLOR_BLUE , COLOR_RED |
|
50 |
}; |
|
51 |
|
|
52 | 46 |
static final float F = 0.48f; // length of the edge of the corner cubit. Keep<0.5 |
53 | 47 |
// Assuming the length of the edge of the whole |
54 | 48 |
// tetrahedron is 2.0 (ie standard, equal to numLayers |
... | ... | |
155 | 149 |
return mQuats; |
156 | 150 |
} |
157 | 151 |
|
158 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
159 |
|
|
160 |
int getNumFaceColors() |
|
161 |
{ |
|
162 |
return FACE_COLORS.length; |
|
163 |
} |
|
164 |
|
|
165 | 152 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
166 | 153 |
|
167 | 154 |
int getSolvedFunctionIndex() |
... | ... | |
191 | 178 |
return 6; |
192 | 179 |
} |
193 | 180 |
|
194 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
195 |
|
|
196 |
float getScreenRatio() |
|
197 |
{ |
|
198 |
return 0.88f; |
|
199 |
} |
|
200 |
|
|
201 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
202 |
|
|
203 |
boolean shouldResetTextureMaps() |
|
204 |
{ |
|
205 |
return false; |
|
206 |
} |
|
207 |
|
|
208 | 181 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
209 | 182 |
|
210 | 183 |
int getFaceColor(int cubit, int cubitface, int size) |
... | ... | |
370 | 343 |
return cubit<4 ? 0 : (cubit<10?1:2); |
371 | 344 |
} |
372 | 345 |
|
373 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
374 |
|
|
375 |
int getColor(int face) |
|
376 |
{ |
|
377 |
return FACE_COLORS[face]; |
|
378 |
} |
|
379 |
|
|
380 | 346 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
381 | 347 |
|
382 | 348 |
ObjectSticker retSticker(int face) |
... | ... | |
406 | 372 |
return mStickers[face/NUM_FACE_COLORS]; |
407 | 373 |
} |
408 | 374 |
|
409 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
410 |
// SQ6/3 = height of the tetrahedron |
|
411 |
|
|
412 |
float returnMultiplier() |
|
413 |
{ |
|
414 |
return getNumLayers()/(SQ6/3); |
|
415 |
} |
|
416 |
|
|
417 | 375 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
418 | 376 |
// PUBLIC API |
419 | 377 |
|
Also available in: Unified diff
Introduce abstract 4,6,8 adn 12 classes.