Revision 3bf19410
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/objectlib/objects/TwistyTrajber.java | ||
---|---|---|
24 | 24 |
import org.distorted.objectlib.helpers.ObjectFaceShape; |
25 | 25 |
import org.distorted.objectlib.helpers.ObjectShape; |
26 | 26 |
import org.distorted.objectlib.scrambling.ScrambleState; |
27 |
import org.distorted.objectlib.main.ObjectControl; |
|
28 | 27 |
import org.distorted.objectlib.main.ObjectType; |
29 | 28 |
import org.distorted.objectlib.main.ShapeOctahedron; |
30 | 29 |
import org.distorted.objectlib.touchcontrol.TouchControlOctahedron; |
... | ... | |
58 | 57 |
|
59 | 58 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
60 | 59 |
|
61 |
public TwistyTrajber(int[] numL, int meshState, Static4D quat, Static3D move, float scale, InputStream stream) |
|
60 |
public TwistyTrajber(int[] numL, int meshState, int iconMode, Static4D quat, Static3D move, float scale, InputStream stream)
|
|
62 | 61 |
{ |
63 |
super(numL, meshState, numL[0], quat, move, scale, stream); |
|
62 |
super(numL, meshState, iconMode, numL[0], quat, move, scale, stream);
|
|
64 | 63 |
} |
65 | 64 |
|
66 | 65 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
509 | 508 |
|
510 | 509 |
if( variant==0 ) |
511 | 510 |
{ |
512 |
float[][] bands = { {0.05f,35,0.15f,0.3f,4,1,1},{0.00f,35,0.15f,0.3f,4,1,1} }; |
|
511 |
float height = isInIconMode() ? 0.001f : 0.05f; |
|
512 |
float[][] bands = { {height,35,0.15f,0.3f,4,1,1},{0.001f,35,0.15f,0.3f,4,1,1} }; |
|
513 | 513 |
float[][] corners = { {0.03f,0.10f} }; |
514 | 514 |
float[][] centers = { { LEN/2, 0.0f, -LEN/2} }; |
515 | 515 |
int[] bandIndices = numL==3 ? new int[] { 0,0,0,0,1,1,1,1,1 } : new int[] { 0,1,1,1,1,1 }; |
... | ... | |
518 | 518 |
} |
519 | 519 |
if( variant==1 ) |
520 | 520 |
{ |
521 |
float height = isInIconMode() ? 0.001f : 0.03f; |
|
521 | 522 |
final float B = LEN*(1-2*CUT); |
522 |
float[][] bands = { {0.03f,35,0.15f,0.3f,3,1,1},{0.00f,35,0.15f,0.3f,3,1,1} };
|
|
523 |
float[][] bands = { {height,35,0.15f,0.3f,3,1,1},{0.001f,35,0.15f,0.3f,3,1,1} };
|
|
523 | 524 |
float[][] corners = { {0.02f,0.10f} }; |
524 | 525 |
float[][] centers = { { 0, 0, -B} }; |
525 | 526 |
int[] bandIndices = numL==3 ? new int[] { 0,0,1,1,1,1 } : new int[] { 0,1,1,1,1 }; |
... | ... | |
528 | 529 |
} |
529 | 530 |
else |
530 | 531 |
{ |
532 |
float height = isInIconMode() ? 0.001f : 0.03f; |
|
531 | 533 |
final float L = LEN*(1-3*CUT); |
532 |
float[][] bands = { {0.03f,35,0.15f,0.3f,4,1,1},{0.00f,35,0.15f,0.3f,4,0,0} };
|
|
534 |
float[][] bands = { {height,35,0.15f,0.3f,4,1,1},{0.001f,35,0.15f,0.3f,4,0,0} };
|
|
533 | 535 |
float[][] corners = { {0.02f,0.10f} }; |
534 | 536 |
float[][] centers = { {0, -(SQ2/3)*L,-2*L/3} }; |
535 | 537 |
int[] bandIndices = { 0,1,1,1 }; |
... | ... | |
564 | 566 |
|
565 | 567 |
public float getStickerStroke() |
566 | 568 |
{ |
567 |
return ObjectControl.isInIconMode() ? 0.20f : 0.10f;
|
|
569 |
return isInIconMode() ? 0.20f : 0.10f; |
|
568 | 570 |
} |
569 | 571 |
|
570 | 572 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Mode the 'iconMode' from static variable in ObjectControl to member varaible in TwistyObject (safer)