Revision efa81f0c
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyDino.java | ||
---|---|---|
32 | 32 |
|
33 | 33 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
34 | 34 |
|
35 |
public abstract class TwistyDino extends TwistyObject
|
|
35 |
public abstract class TwistyDino extends Twisty6
|
|
36 | 36 |
{ |
37 | 37 |
// the four rotation axis of a RubikDino. Must be normalized. |
38 | 38 |
static final Static3D[] ROT_AXIS = new Static3D[] |
... | ... | |
43 | 43 |
new Static3D(+SQ3/3,-SQ3/3,-SQ3/3) |
44 | 44 |
}; |
45 | 45 |
|
46 |
private static final int[] FACE_COLORS = new int[] |
|
47 |
{ |
|
48 |
COLOR_YELLOW, COLOR_WHITE, |
|
49 |
COLOR_BLUE , COLOR_GREEN, |
|
50 |
COLOR_RED , COLOR_ORANGE |
|
51 |
}; |
|
52 |
|
|
53 | 46 |
private int[] mBasicAngle; |
54 | 47 |
private Static4D[] mQuats; |
55 | 48 |
private ObjectSticker[] mStickers; |
... | ... | |
86 | 79 |
}; |
87 | 80 |
} |
88 | 81 |
|
89 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
90 |
|
|
91 |
float getScreenRatio() |
|
92 |
{ |
|
93 |
return 0.5f; |
|
94 |
} |
|
95 |
|
|
96 | 82 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
97 | 83 |
|
98 | 84 |
Static4D[] getQuats() |
... | ... | |
101 | 87 |
return mQuats; |
102 | 88 |
} |
103 | 89 |
|
104 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
105 |
|
|
106 |
int getNumFaceColors() |
|
107 |
{ |
|
108 |
return FACE_COLORS.length; |
|
109 |
} |
|
110 |
|
|
111 | 90 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
112 | 91 |
|
113 | 92 |
float[][] getCuts(int size) |
... | ... | |
193 | 172 |
return 0; |
194 | 173 |
} |
195 | 174 |
|
196 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
197 |
|
|
198 |
int getColor(int face) |
|
199 |
{ |
|
200 |
return FACE_COLORS[face]; |
|
201 |
} |
|
202 |
|
|
203 | 175 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
204 | 176 |
|
205 | 177 |
ObjectSticker retSticker(int face) |
... | ... | |
217 | 189 |
return mStickers[face/NUM_FACE_COLORS]; |
218 | 190 |
} |
219 | 191 |
|
220 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
221 |
|
|
222 |
float returnMultiplier() |
|
223 |
{ |
|
224 |
return 2.0f; |
|
225 |
} |
|
226 |
|
|
227 | 192 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
228 | 193 |
// PUBLIC API |
229 | 194 |
|
Also available in: Unified diff
Introduce abstract 4,6,8 adn 12 classes.