Revision ed0988c0
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistyIvy.java | ||
---|---|---|
63 | 63 |
super(numL, meshState, numL[0], quat, move, scale, stream); |
64 | 64 |
} |
65 | 65 |
|
66 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
67 |
// Back sides of the cubits here have all vertices on the walls and get mis-detected as external |
|
68 |
// walls by the automatic sticker engine. Manually provide the (cubit face)<->(puzzle face) map. |
|
69 |
|
|
70 |
@Override |
|
71 |
public int getCubitFaceMap(int cubit, int face) |
|
72 |
{ |
|
73 |
if( mFaceMap==null ) |
|
74 |
{ |
|
75 |
mFaceMap = new int[][] |
|
76 |
{ |
|
77 |
{ 4, 0, 2, -1,-1,-1 }, |
|
78 |
{ 5, 1, 2, -1,-1,-1 }, |
|
79 |
{ 4, 1, 3, -1,-1,-1 }, |
|
80 |
{ 5, 0, 3, -1,-1,-1 }, |
|
81 |
|
|
82 |
{ 0, -1,-1,-1,-1,-1 }, |
|
83 |
{ 1, -1,-1,-1,-1,-1 }, |
|
84 |
{ 2, -1,-1,-1,-1,-1 }, |
|
85 |
{ 3, -1,-1,-1,-1,-1 }, |
|
86 |
{ 4, -1,-1,-1,-1,-1 }, |
|
87 |
{ 5, -1,-1,-1,-1,-1 }, |
|
88 |
}; |
|
89 |
} |
|
90 |
|
|
91 |
return mFaceMap[cubit][face]; |
|
92 |
} |
|
93 |
|
|
94 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
95 |
// ditto, manually provide the sticker coordinates. |
|
96 |
|
|
97 |
@Override |
|
98 |
public void adjustStickerCoords() |
|
99 |
{ |
|
100 |
mStickerCoords = new float[][] |
|
101 |
{ |
|
102 |
{ 0.29258922f, -0.5f, 0.29258922f, 0.29258922f, -0.5f, 0.29258922f }, |
|
103 |
{ -0.5f, 0.5f, 0.5f, -0.5f } |
|
104 |
}; |
|
105 |
} |
|
106 |
|
|
66 | 107 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
67 | 108 |
|
68 | 109 |
public ScrambleState[] getScrambleStates() |
... | ... | |
353 | 394 |
return cubit<4 ? 0:1; |
354 | 395 |
} |
355 | 396 |
|
356 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
357 |
|
|
358 |
public int getCubitFaceColor(int cubit, int face) |
|
359 |
{ |
|
360 |
if( mFaceMap==null ) |
|
361 |
{ |
|
362 |
mFaceMap = new int[][] |
|
363 |
{ |
|
364 |
{ 4, 0, 2, -1,-1,-1 }, |
|
365 |
{ 5, 1, 2, -1,-1,-1 }, |
|
366 |
{ 4, 1, 3, -1,-1,-1 }, |
|
367 |
{ 5, 0, 3, -1,-1,-1 }, |
|
368 |
|
|
369 |
{ 0, -1,-1,-1,-1,-1 }, |
|
370 |
{ 1, -1,-1,-1,-1,-1 }, |
|
371 |
{ 2, -1,-1,-1,-1,-1 }, |
|
372 |
{ 3, -1,-1,-1,-1,-1 }, |
|
373 |
{ 4, -1,-1,-1,-1,-1 }, |
|
374 |
{ 5, -1,-1,-1,-1,-1 }, |
|
375 |
}; |
|
376 |
} |
|
377 |
|
|
378 |
return mFaceMap[cubit][face]; |
|
379 |
} |
|
380 |
|
|
381 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
382 |
|
|
383 |
public void adjustStickerCoords() |
|
384 |
{ |
|
385 |
mStickerCoords = new float[][] |
|
386 |
{ |
|
387 |
{ 0.29258922f, -0.5f, 0.29258922f, 0.29258922f, -0.5f, 0.29258922f }, |
|
388 |
{ -0.5f, 0.5f, 0.5f, -0.5f } |
|
389 |
}; |
|
390 |
} |
|
391 |
|
|
392 | 397 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
393 | 398 |
|
394 | 399 |
public float getStickerRadius() |
Also available in: Unified diff
unify every isSolved() routine except one - the Dino4 is still special.