Revision 3bf19410
Added by Leszek Koltunski about 2 years ago
src/main/java/org/distorted/objectlib/helpers/ObjectFaceShape.java | ||
---|---|---|
19 | 19 |
|
20 | 20 |
package org.distorted.objectlib.helpers; |
21 | 21 |
|
22 |
import org.distorted.objectlib.main.ObjectControl; |
|
23 |
|
|
24 | 22 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
25 | 23 |
|
26 | 24 |
public class ObjectFaceShape |
... | ... | |
31 | 29 |
private final float[][] mCenters; |
32 | 30 |
private final int[] mCenterIndices; |
33 | 31 |
private final float[] mConvexityCenter; |
34 |
|
|
35 |
private float[][] mBands; |
|
32 |
private final float[][] mBands; |
|
36 | 33 |
|
37 | 34 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
38 | 35 |
|
... | ... | |
46 | 43 |
mCenters = centers; |
47 | 44 |
mCenterIndices = centIndices; |
48 | 45 |
mConvexityCenter = convexityCenter; |
49 |
|
|
50 |
if( ObjectControl.isInIconMode() ) |
|
51 |
{ |
|
52 |
int len = bands.length; |
|
53 |
mBands = new float[len][]; |
|
54 |
|
|
55 |
for(int i=0; i<len; i++) |
|
56 |
{ |
|
57 |
int l = bands[i].length; |
|
58 |
mBands[i] = new float[l]; |
|
59 |
mBands[i][0] = 0.01f; |
|
60 |
if (l>=1) System.arraycopy(bands[i], 1, mBands[i], 1, l-1); |
|
61 |
} |
|
62 |
} |
|
63 | 46 |
} |
64 | 47 |
|
65 | 48 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Mode the 'iconMode' from static variable in ObjectControl to member varaible in TwistyObject (safer)