Revision 10a842b0
Added by Leszek Koltunski over 1 year ago
src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java | ||
---|---|---|
236 | 236 |
return new int[][][] { {{1,2}},{{1,2}},{{0,2}},{{0,2}},{{0,1}},{{0,1}} }; |
237 | 237 |
} |
238 | 238 |
|
239 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
240 |
|
|
241 |
public float[] getDist3D(int[] numLayers) |
|
242 |
{ |
|
243 |
float x = numLayers[0]; |
|
244 |
float y = numLayers[1]; |
|
245 |
float z = numLayers[2]; |
|
246 |
float a = (x+y+z)/1.5f; |
|
247 |
|
|
248 |
return new float[] {x/a,x/a,y/a,y/a,z/a,z/a}; |
|
249 |
} |
|
250 |
|
|
251 | 239 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
252 | 240 |
|
253 | 241 |
public Static3D[] getFaceAxis() |
src/main/java/org/distorted/objectlib/objects/TwistyBandagedCuboid.java | ||
---|---|---|
508 | 508 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
509 | 509 |
// PUBLIC API |
510 | 510 |
|
511 |
public float[] getDist3D(int[] numLayers) |
|
512 |
{ |
|
513 |
float x = numLayers[0]; |
|
514 |
float y = numLayers[1]; |
|
515 |
float z = numLayers[2]; |
|
516 |
float a = (x+y+z)/1.5f; |
|
517 |
|
|
518 |
return new float[] {x/a,x/a,y/a,y/a,z/a,z/a}; |
|
519 |
} |
|
520 |
|
|
521 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
522 |
|
|
511 | 523 |
public float getStickerRadius() |
512 | 524 |
{ |
513 | 525 |
return 0.10f; |
src/main/java/org/distorted/objectlib/objects/TwistyCamouflage.java | ||
---|---|---|
9 | 9 |
|
10 | 10 |
package org.distorted.objectlib.objects; |
11 | 11 |
|
12 |
import static org.distorted.objectlib.touchcontrol.TouchControl.TC_CHANGING_SHAPEMOD;
|
|
12 |
import static org.distorted.objectlib.touchcontrol.TouchControl.TC_CHANGING_MIRROR;
|
|
13 | 13 |
|
14 | 14 |
import org.distorted.library.effect.EffectName; |
15 | 15 |
import org.distorted.library.type.Static3D; |
... | ... | |
27 | 27 |
|
28 | 28 |
public class TwistyCamouflage extends TwistyBandagedAbstract |
29 | 29 |
{ |
30 |
private static final float SIZE_CORRECTION = 1.1f; |
|
31 |
|
|
30 | 32 |
public static final float[][] CAM_333 = new float[][] |
31 | 33 |
{ |
32 | 34 |
getCenters( -1.0f, 1.0f, 1.0f, 2, 2, 2), |
... | ... | |
117 | 119 |
|
118 | 120 |
public TwistyCamouflage(InitData data, int meshState, int iconMode, Static4D quat, Static3D move, float scale, InputStream stream) |
119 | 121 |
{ |
120 |
super(data, meshState, iconMode, (data.getNumLayers()[0]+data.getNumLayers()[1]+data.getNumLayers()[2])/3.0f, quat, move, scale, stream); |
|
122 |
super(data, meshState, iconMode, SIZE_CORRECTION*(data.getNumLayers()[0]+data.getNumLayers()[1]+data.getNumLayers()[2])/3.0f, quat, move, scale, stream); |
|
123 |
} |
|
124 |
|
|
125 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
126 |
|
|
127 |
@Override |
|
128 |
public int getInternalColor() |
|
129 |
{ |
|
130 |
return 0xff333333; |
|
121 | 131 |
} |
122 | 132 |
|
123 | 133 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
190 | 200 |
|
191 | 201 |
public int getTouchControlType() |
192 | 202 |
{ |
193 |
return TC_CHANGING_SHAPEMOD; |
|
203 |
return TC_CHANGING_MIRROR; |
|
204 |
} |
|
205 |
|
|
206 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
207 |
|
|
208 |
public float[] getDist3D(int[] numLayers) |
|
209 |
{ |
|
210 |
float x = numLayers[0]; |
|
211 |
float y = numLayers[1]; |
|
212 |
float z = numLayers[2]; |
|
213 |
float a = SIZE_CORRECTION*(x+y+z)/1.5f; |
|
214 |
|
|
215 |
return new float[] {(x+2)/a,x/a,y/a,(y+2)/a,z/a,(z+2)/a}; |
|
194 | 216 |
} |
195 | 217 |
|
196 | 218 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Progress with the Camouflage 3x3x3.
Now only proper scrambling remains.