Revision 3bf19410
Added by Leszek Koltunski about 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistyFisher.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.ShapeHexahedron; |
30 | 29 |
import org.distorted.objectlib.touchcontrol.TouchControlHexahedron; |
... | ... | |
53 | 52 |
|
54 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
55 | 54 |
|
56 |
public TwistyFisher(int[] numL, int meshState, Static4D quat, Static3D move, float scale, InputStream stream) |
|
55 |
public TwistyFisher(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 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
307 | 306 |
if( variant==0 ) |
308 | 307 |
{ |
309 | 308 |
final float A = (3-SQ2)/2; |
310 |
|
|
311 |
float[][] bands = { {0.025f,20,0.2f,0.4f,5,1,1}, {0.02f,20,0.2f,0.4f,5,1,1} }; |
|
309 |
float h1 = isInIconMode() ? 0.001f : 0.025f; |
|
310 |
float h2 = isInIconMode() ? 0.001f : 0.020f; |
|
311 |
float[][] bands = { {h1,20,0.2f,0.4f,5,1,1}, {h2,20,0.2f,0.4f,5,1,1} }; |
|
312 | 312 |
int[] bandIndices = { 0,0,0,1,1 }; |
313 | 313 |
float[][] corners = { {0.04f,0.09f} }; |
314 | 314 |
int[] indices = { 0,0,0,0,-1,-1 }; |
... | ... | |
318 | 318 |
else if( variant==1 ) |
319 | 319 |
{ |
320 | 320 |
final float B = SQ2/2; |
321 |
|
|
322 |
float[][] bands = { {0.025f,20,0.2f,0.4f,5,1,1}, {0.02f,20,0.2f,0.4f,5,1,1} }; |
|
321 |
float h1 = isInIconMode() ? 0.001f : 0.025f; |
|
322 |
float h2 = isInIconMode() ? 0.001f : 0.020f; |
|
323 |
float[][] bands = { {h1,20,0.2f,0.4f,5,1,1}, {h2,20,0.2f,0.4f,5,1,1} }; |
|
323 | 324 |
int[] bandIndices = { 0,0,0,1,1,1,0 }; |
324 | 325 |
float[][] corners = { {0.03f,0.09f} }; |
325 | 326 |
int[] indices = { 0,0,-1,-1,0,0,0,-1,-1,0 }; |
... | ... | |
328 | 329 |
} |
329 | 330 |
else |
330 | 331 |
{ |
331 |
float[][] bands = { {0.05f,35,0.25f,0.7f,5,1,0}, {0.04f,35,0.25f,0.7f,5,1,0} }; |
|
332 |
float h1 = isInIconMode() ? 0.001f : 0.05f; |
|
333 |
float h2 = isInIconMode() ? 0.001f : 0.04f; |
|
334 |
float[][] bands = { {h1,35,0.25f,0.7f,5,1,0}, {h2,35,0.25f,0.7f,5,1,0} }; |
|
332 | 335 |
int[] bandIndices = { 1,0,0,1,1,1 }; |
333 | 336 |
float[][] corners = { {0.04f,0.12f} }; |
334 | 337 |
int[] indices = { 0,0,0,0,0,0,0,0 }; |
... | ... | |
362 | 365 |
|
363 | 366 |
public float getStickerStroke() |
364 | 367 |
{ |
365 |
return ObjectControl.isInIconMode() ? 0.22f : 0.10f;
|
|
368 |
return isInIconMode() ? 0.22f : 0.10f; |
|
366 | 369 |
} |
367 | 370 |
|
368 | 371 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Mode the 'iconMode' from static variable in ObjectControl to member varaible in TwistyObject (safer)