Revision f6d06256
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/objects/RubikDino.java | ||
---|---|---|
100 | 100 |
new Static3D(-0.5f, 0.0f,-0.5f ) |
101 | 101 |
}; |
102 | 102 |
|
103 |
private static final int[] mFaceMap = {2,4, 4,0, 3,4, 4,1, |
|
104 |
0,2, 0,3, 1,3, 1,2, |
|
105 |
2,5, 5,0, 3,5, 5,1 }; |
|
106 |
|
|
103 | 107 |
private static MeshBase mMesh; |
104 | 108 |
|
105 | 109 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
273 | 277 |
return mesh; |
274 | 278 |
} |
275 | 279 |
|
280 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
281 |
|
|
282 |
int getFaceColor(int cubit, int cubitface, int size) |
|
283 |
{ |
|
284 |
switch(cubitface) |
|
285 |
{ |
|
286 |
case 0 : return mFaceMap[2*cubit]; |
|
287 |
case 1 : return mFaceMap[2*cubit+1]; |
|
288 |
default: return NUM_FACES; |
|
289 |
} |
|
290 |
} |
|
291 |
|
|
276 | 292 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
277 | 293 |
|
278 | 294 |
void createFaceTexture(Canvas canvas, Paint paint, int face, int left, int top, int side) |
Also available in: Unified diff
Move the knowledge about colors of individual cubit faces down to each Object subclass.