Revision 3bf19410
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/objectlib/objects/TwistySkewb.java | ||
---|---|---|
29 | 29 |
|
30 | 30 |
import org.distorted.objectlib.helpers.ObjectFaceShape; |
31 | 31 |
import org.distorted.objectlib.touchcontrol.TouchControlHexahedron; |
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 TwistySkewb(int[] numL, int meshState, Static4D quat, Static3D move, float scale, InputStream stream) |
|
55 |
public TwistySkewb(int[] numL, int meshState, int iconMode, Static4D quat, Static3D move, float scale, InputStream stream)
|
|
57 | 56 |
{ |
58 |
super(numL, meshState, 2*numL[0]-2, quat, move, scale, stream); |
|
57 |
super(numL, meshState, iconMode, 2*numL[0]-2, quat, move, scale, stream);
|
|
59 | 58 |
} |
60 | 59 |
|
61 | 60 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
388 | 387 |
int N = numL==2 ? 7:5; |
389 | 388 |
int E1= numL==2 ? 3:2; |
390 | 389 |
int E2= numL==2 ? 5:3; |
391 |
float[][] bands = { {0.020f,35,0.16f,0.7f,N,E1,E1}, {0.000f, 0,1.00f,0.0f,3,1,E2} }; |
|
390 |
float height = isInIconMode() ? 0.001f : 0.02f; |
|
391 |
float[][] bands = { {height,35,0.16f,0.7f,N,E1,E1}, {0.001f, 35,1.00f,0.0f,3,1,E2} }; |
|
392 | 392 |
int[] bandIndices = { 0,0,0,1,1,1 }; |
393 | 393 |
float[][] corners = { {0.05f,0.25f}, {0.05f,0.20f} }; |
394 | 394 |
int[] cornerIndices = { 1,1,1,0,0 }; |
... | ... | |
400 | 400 |
{ |
401 | 401 |
int N = numL==2 ? 7:6; |
402 | 402 |
int E = numL==2 ? 3:1; |
403 |
float[][] bands = { {0.04f,35,SQ2/8,0.9f,N,E,E}, {0.000f,0,1,0.0f,3,0,0} }; |
|
403 |
float height = isInIconMode() ? 0.001f : 0.04f; |
|
404 |
float[][] bands = { {height,35,SQ2/8,0.9f,N,E,E}, {0.001f,35,1,0.0f,3,0,0} }; |
|
404 | 405 |
int[] bandIndices = { 0,1,1,1,1 }; |
405 | 406 |
float[][] corners = { {0.06f,0.15f} }; |
406 | 407 |
int[] cornerIndices = { 0,0,0,0,0 }; |
... | ... | |
412 | 413 |
{ |
413 | 414 |
int N = numL==2 ? 7:5; |
414 | 415 |
int E = numL==2 ? 5:2; |
415 |
float[][] bands = { {0.035f,30,0.16f,0.8f,N,2,E}, {0.020f,45,0.16f,0.2f,3,1,2} }; |
|
416 |
float h1 = isInIconMode() ? 0.001f : 0.035f; |
|
417 |
float h2 = isInIconMode() ? 0.001f : 0.020f; |
|
418 |
float[][] bands = { {h1,30,0.16f,0.8f,N,2,E}, {h2,45,0.16f,0.2f,3,1,2} }; |
|
416 | 419 |
int[] bandIndices = { 0,0,1,1 }; |
417 | 420 |
float[][] corners = { {0.07f,0.20f}, {0.02f,0.30f} }; |
418 | 421 |
int[] cornerIndices = { 0,0,1,1 }; |
... | ... | |
449 | 452 |
{ |
450 | 453 |
float stroke = 0.08f; |
451 | 454 |
|
452 |
if( ObjectControl.isInIconMode() )
|
|
455 |
if( isInIconMode() ) |
|
453 | 456 |
{ |
454 | 457 |
int[] numLayers = getNumLayers(); |
455 | 458 |
stroke *= (numLayers[0]==2 ? 2.0f : 2.7f); |
Also available in: Unified diff
Mode the 'iconMode' from static variable in ObjectControl to member varaible in TwistyObject (safer)