Revision efa81f0c
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyHelicopter.java | ||
---|---|---|
33 | 33 |
|
34 | 34 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
35 | 35 |
|
36 |
public class TwistyHelicopter extends TwistyObject
|
|
36 |
public class TwistyHelicopter extends Twisty6
|
|
37 | 37 |
{ |
38 | 38 |
// the six rotation axis of a Helicopter. Must be normalized. |
39 | 39 |
static final Static3D[] ROT_AXIS = new Static3D[] |
... | ... | |
46 | 46 |
new Static3D(-SQ2/2, -SQ2/2, 0) |
47 | 47 |
}; |
48 | 48 |
|
49 |
private static final int[] FACE_COLORS = new int[] |
|
50 |
{ |
|
51 |
COLOR_YELLOW, COLOR_WHITE, |
|
52 |
COLOR_BLUE , COLOR_GREEN, |
|
53 |
COLOR_RED , COLOR_ORANGE |
|
54 |
}; |
|
55 |
|
|
56 |
private static final int FACES_PER_CUBIT =6; |
|
57 |
|
|
58 | 49 |
private ScrambleState[] mStates; |
59 | 50 |
private int[] mBasicAngle; |
60 | 51 |
private Static4D[] mQuats; |
... | ... | |
143 | 134 |
return status<0 ? null : buildSolvedQuats(MovementHelicopter.FACE_AXIS[status],mQuats); |
144 | 135 |
} |
145 | 136 |
|
146 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
147 |
|
|
148 |
float getScreenRatio() |
|
149 |
{ |
|
150 |
return 0.5f; |
|
151 |
} |
|
152 |
|
|
153 | 137 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
154 | 138 |
|
155 | 139 |
Static4D[] getQuats() |
... | ... | |
158 | 142 |
return mQuats; |
159 | 143 |
} |
160 | 144 |
|
161 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
162 |
|
|
163 |
boolean shouldResetTextureMaps() |
|
164 |
{ |
|
165 |
return false; |
|
166 |
} |
|
167 |
|
|
168 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
169 |
|
|
170 |
int getNumFaceColors() |
|
171 |
{ |
|
172 |
return FACE_COLORS.length; |
|
173 |
} |
|
174 |
|
|
175 | 145 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
176 | 146 |
|
177 | 147 |
int getSolvedFunctionIndex() |
... | ... | |
198 | 168 |
|
199 | 169 |
int getNumCubitFaces() |
200 | 170 |
{ |
201 |
return FACES_PER_CUBIT;
|
|
171 |
return 4;
|
|
202 | 172 |
} |
203 | 173 |
|
204 | 174 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
395 | 365 |
return mFaceMap[cubit][cubitface]; |
396 | 366 |
} |
397 | 367 |
|
398 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
399 |
|
|
400 |
int getColor(int face) |
|
401 |
{ |
|
402 |
return FACE_COLORS[face]; |
|
403 |
} |
|
404 |
|
|
405 | 368 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
406 | 369 |
|
407 | 370 |
ObjectSticker retSticker(int face) |
... | ... | |
419 | 382 |
return mStickers[face/NUM_FACE_COLORS]; |
420 | 383 |
} |
421 | 384 |
|
422 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
423 |
|
|
424 |
float returnMultiplier() |
|
425 |
{ |
|
426 |
return 2.0f; |
|
427 |
} |
|
428 |
|
|
429 | 385 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
430 | 386 |
// PUBLIC API |
431 | 387 |
|
Also available in: Unified diff
Introduce abstract 4,6,8 adn 12 classes.