Revision c5de0343
Added by Leszek Koltunski about 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistyMixup3x3Plus.java | ||
---|---|---|
19 | 19 |
|
20 | 20 |
package org.distorted.objectlib.objects; |
21 | 21 |
|
22 |
import java.io.InputStream; |
|
23 |
|
|
22 | 24 |
import org.distorted.library.type.Static3D; |
23 | 25 |
import org.distorted.library.type.Static4D; |
24 | 26 |
import org.distorted.objectlib.helpers.ObjectFaceShape; |
... | ... | |
26 | 28 |
import org.distorted.objectlib.helpers.ObjectSignature; |
27 | 29 |
import org.distorted.objectlib.main.ObjectType; |
28 | 30 |
|
29 |
import java.io.InputStream; |
|
30 |
|
|
31 | 31 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
32 | 32 |
|
33 | 33 |
public class TwistyMixup3x3Plus extends TwistyMixup |
34 | 34 |
{ |
35 |
private static final float SHORT_EDGE = (6*SQ2-3)/14; |
|
36 |
private static final float LONG_EDGE = (12-3*SQ2)/14; |
|
37 |
|
|
38 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
39 |
|
|
35 | 40 |
public TwistyMixup3x3Plus(int[] numL, int meshState, int iconMode, Static4D quat, Static3D move, float scale, InputStream stream) |
36 | 41 |
{ |
37 | 42 |
super(numL, meshState, iconMode, quat, move, scale, stream); |
... | ... | |
43 | 48 |
{ |
44 | 49 |
if( mCuts==null ) |
45 | 50 |
{ |
46 |
float C = (6*SQ2-3)/14; |
|
47 |
float[] cut = new float[] {-C,+C}; |
|
51 |
float[] cut = new float[] {-SHORT_EDGE,+SHORT_EDGE}; |
|
48 | 52 |
mCuts = new float[][] { cut,cut,cut }; |
49 | 53 |
} |
50 | 54 |
|
... | ... | |
57 | 61 |
{ |
58 | 62 |
if( mPosition==null ) |
59 | 63 |
{ |
60 |
float SHORT_EDGE = 1.5f-0.75f*SQ2; |
|
61 |
float LONG_EDGE = 1.5f*(SQ2-1); |
|
62 |
|
|
63 | 64 |
final float DIST_CORNER = LONG_EDGE+SHORT_EDGE; |
64 | 65 |
final float DIST_EDGE = 1.5f*LONG_EDGE+SHORT_EDGE; |
65 | 66 |
final float DIST_CENTER = LONG_EDGE+SHORT_EDGE; |
... | ... | |
146 | 147 |
|
147 | 148 |
public ObjectShape getObjectShape(int variant) |
148 | 149 |
{ |
149 |
float SHORT_EDGE = 1.5f-0.75f*SQ2; |
|
150 |
float LONG_EDGE = 1.5f*(SQ2-1); |
|
151 |
|
|
152 | 150 |
if( variant==0 || variant==3 ) |
153 | 151 |
{ |
154 | 152 |
float X = variant==0 ? LONG_EDGE : SHORT_EDGE; |
... | ... | |
332 | 330 |
|
333 | 331 |
public int getComplexity() |
334 | 332 |
{ |
335 |
return 2;
|
|
333 |
return 3;
|
|
336 | 334 |
} |
337 | 335 |
|
338 | 336 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Mixup Plus Cube: icon,mesh,jsons.