Revision 3bf19410
Added by Leszek Koltunski about 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java | ||
---|---|---|
29 | 29 |
|
30 | 30 |
import org.distorted.objectlib.helpers.ObjectFaceShape; |
31 | 31 |
import org.distorted.objectlib.touchcontrol.TouchControlTetrahedron; |
32 |
import org.distorted.objectlib.main.ObjectControl; |
|
33 | 32 |
import org.distorted.objectlib.main.ObjectType; |
34 | 33 |
import org.distorted.objectlib.helpers.ObjectShape; |
35 | 34 |
import org.distorted.objectlib.scrambling.ScrambleState; |
... | ... | |
53 | 52 |
|
54 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
55 | 54 |
|
56 |
public TwistyPyraminx(int[] numL, int meshState, Static4D quat, Static3D move, float scale, InputStream stream) |
|
55 |
public TwistyPyraminx(int[] numL, int meshState, int iconMode, Static4D quat, Static3D move, float scale, InputStream stream)
|
|
57 | 56 |
{ |
58 |
super(numL, meshState, numL[0], quat, move, scale, stream); |
|
57 |
super(numL, meshState, iconMode, numL[0], quat, move, scale, stream);
|
|
59 | 58 |
} |
60 | 59 |
|
61 | 60 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
270 | 269 |
public ObjectFaceShape getObjectFaceShape(int variant) |
271 | 270 |
{ |
272 | 271 |
int numL = getNumLayers()[0]; |
272 |
float height = isInIconMode() ? 0.001f : 0.05f; |
|
273 | 273 |
|
274 | 274 |
if( variant==0 ) |
275 | 275 |
{ |
276 | 276 |
int N = numL==3? 6 : 5; |
277 | 277 |
int E = numL==3? 2 : 1; |
278 |
float[][] bands = { {0.05f,20,0.5f,0.8f,N,E,E} };
|
|
278 |
float[][] bands = { {height,20,0.5f,0.8f,N,E,E} };
|
|
279 | 279 |
int[] bandIndices = { 0,0,0,0,0,0,0,0 }; |
280 | 280 |
float[][] corners = { {0.04f,0.20f} }; |
281 | 281 |
int[] cornerIndices = { 0,0,0,0,0,0 }; |
... | ... | |
287 | 287 |
{ |
288 | 288 |
int N = numL==3? 6 : 5; |
289 | 289 |
int E = numL==3? 2 : 1; |
290 |
float[][] bands = { {0.05f,35,0.5f,0.8f,N,E,E} };
|
|
290 |
float[][] bands = { {height,35,0.5f,0.8f,N,E,E} };
|
|
291 | 291 |
int[] bandIndices = { 0,0,0,0 }; |
292 | 292 |
float[][] corners = { {0.06f,0.15f} }; |
293 | 293 |
int[] cornerIndices = { 0,0,0,0 }; |
... | ... | |
324 | 324 |
{ |
325 | 325 |
float stroke = 0.08f; |
326 | 326 |
|
327 |
if( ObjectControl.isInIconMode() )
|
|
327 |
if( isInIconMode() ) |
|
328 | 328 |
{ |
329 | 329 |
int[] numLayers = getNumLayers(); |
330 | 330 |
|
Also available in: Unified diff
Mode the 'iconMode' from static variable in ObjectControl to member varaible in TwistyObject (safer)