Revision efa81f0c
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyRex.java | ||
---|---|---|
33 | 33 |
|
34 | 34 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
35 | 35 |
|
36 |
public class TwistyRex extends TwistyObject
|
|
36 |
public class TwistyRex extends Twisty6
|
|
37 | 37 |
{ |
38 |
// the four rotation axis of a RubikRex. Must be normalized. |
|
39 | 38 |
static final Static3D[] ROT_AXIS = new Static3D[] |
40 | 39 |
{ |
41 | 40 |
new Static3D(+SQ3/3,+SQ3/3,+SQ3/3), |
... | ... | |
44 | 43 |
new Static3D(+SQ3/3,-SQ3/3,-SQ3/3) |
45 | 44 |
}; |
46 | 45 |
|
47 |
private static final int[] FACE_COLORS = new int[] |
|
48 |
{ |
|
49 |
COLOR_YELLOW, COLOR_WHITE, |
|
50 |
COLOR_BLUE , COLOR_GREEN, |
|
51 |
COLOR_RED , COLOR_ORANGE |
|
52 |
}; |
|
53 |
|
|
54 | 46 |
public static final float REX_D = 0.2f; |
55 | 47 |
|
56 | 48 |
private ScrambleState[] mStates; |
... | ... | |
116 | 108 |
return status<0 ? null : buildSolvedQuats(MovementCornerTwisting.FACE_AXIS[status],mQuats); |
117 | 109 |
} |
118 | 110 |
|
119 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
120 |
|
|
121 |
float getScreenRatio() |
|
122 |
{ |
|
123 |
return 0.5f; |
|
124 |
} |
|
125 |
|
|
126 | 111 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
127 | 112 |
|
128 | 113 |
Static4D[] getQuats() |
... | ... | |
131 | 116 |
return mQuats; |
132 | 117 |
} |
133 | 118 |
|
134 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
135 |
|
|
136 |
int getNumFaceColors() |
|
137 |
{ |
|
138 |
return FACE_COLORS.length; |
|
139 |
} |
|
140 |
|
|
141 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
142 |
|
|
143 |
boolean shouldResetTextureMaps() |
|
144 |
{ |
|
145 |
return false; |
|
146 |
} |
|
147 |
|
|
148 | 119 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
149 | 120 |
|
150 | 121 |
int getSolvedFunctionIndex() |
... | ... | |
409 | 380 |
return mFaceMap[cubit][cubitface]; |
410 | 381 |
} |
411 | 382 |
|
412 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
413 |
|
|
414 |
int getColor(int face) |
|
415 |
{ |
|
416 |
return FACE_COLORS[face]; |
|
417 |
} |
|
418 |
|
|
419 | 383 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
420 | 384 |
|
421 | 385 |
ObjectSticker retSticker(int face) |
... | ... | |
448 | 412 |
return mStickers[face/NUM_FACE_COLORS]; |
449 | 413 |
} |
450 | 414 |
|
451 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
452 |
|
|
453 |
float returnMultiplier() |
|
454 |
{ |
|
455 |
return 2.0f; |
|
456 |
} |
|
457 |
|
|
458 | 415 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
459 | 416 |
// PUBLIC API |
460 | 417 |
|
Also available in: Unified diff
Introduce abstract 4,6,8 adn 12 classes.