Revision bdbbb4c5
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyMinx.java | ||
---|---|---|
19 | 19 |
|
20 | 20 |
package org.distorted.objects; |
21 | 21 |
|
22 |
import static org.distorted.objects.Movement.TYPE_SPLIT_EDGE; |
|
22 |
import static org.distorted.objectlb.Movement.TYPE_SPLIT_EDGE; |
|
23 |
import static org.distorted.objectlb.Movement12.C2; |
|
24 |
import static org.distorted.objectlb.Movement12.LEN; |
|
25 |
import static org.distorted.objectlb.Movement12.SIN54; |
|
23 | 26 |
|
24 | 27 |
import android.content.res.Resources; |
25 | 28 |
|
26 |
import org.distorted.helpers.ObjectSticker;
|
|
27 |
import org.distorted.helpers.ScrambleState;
|
|
29 |
import org.distorted.objectlb.ObjectSticker;
|
|
30 |
import org.distorted.objectlb.ScrambleState;
|
|
28 | 31 |
import org.distorted.library.main.DistortedEffects; |
29 | 32 |
import org.distorted.library.main.DistortedTexture; |
30 | 33 |
import org.distorted.library.mesh.MeshSquare; |
31 | 34 |
import org.distorted.library.type.Static3D; |
32 | 35 |
import org.distorted.library.type.Static4D; |
36 |
import org.distorted.objectlb.Movement; |
|
37 |
import org.distorted.objectlb.Movement12; |
|
38 |
import org.distorted.objectlb.ObjectList; |
|
39 |
import org.distorted.objectlb.Twisty12; |
|
33 | 40 |
|
34 | 41 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
35 | 42 |
|
... | ... | |
39 | 46 |
static final int NUM_CENTERS = 12; |
40 | 47 |
static final int NUM_EDGES = 30; |
41 | 48 |
|
42 |
static final float C2 = (SQ5+3)/4; |
|
43 |
static final float LEN = (float)(Math.sqrt(1.25f+0.5f*SQ5)); |
|
44 |
static final float SIN54 = (SQ5+1)/4; |
|
45 |
static final float COS54 = (float)(Math.sqrt(10-2*SQ5)/4); |
|
46 | 49 |
static final float SIN18 = (SQ5-1)/4; |
47 | 50 |
static final float COS18 = (float)(0.25f*Math.sqrt(10.0f+2.0f*SQ5)); |
48 | 51 |
static final float COS_HALFD= (float)(Math.sqrt(0.5f-0.1f*SQ5)); // cos(half the dihedral angle) |
... | ... | |
102 | 105 |
|
103 | 106 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
104 | 107 |
|
105 |
ScrambleState[] getScrambleStates() |
|
108 |
protected ScrambleState[] getScrambleStates()
|
|
106 | 109 |
{ |
107 | 110 |
if( mStates==null ) |
108 | 111 |
{ |
... | ... | |
509 | 512 |
|
510 | 513 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
511 | 514 |
|
512 |
int[] getSolvedQuats(int cubit, int numLayers) |
|
515 |
protected int[] getSolvedQuats(int cubit, int numLayers)
|
|
513 | 516 |
{ |
514 | 517 |
if( mQuats==null ) initializeQuats(); |
515 | 518 |
if( mFaceMap==null ) mFaceMap = new int[] {8,10,3,7,1,11,9,2,4,0,5,6}; |
... | ... | |
519 | 522 |
|
520 | 523 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
521 | 524 |
|
522 |
Static4D[] getQuats() |
|
525 |
protected Static4D[] getQuats()
|
|
523 | 526 |
{ |
524 | 527 |
if( mQuats==null ) initializeQuats(); |
525 | 528 |
return mQuats; |
... | ... | |
578 | 581 |
|
579 | 582 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
580 | 583 |
|
581 |
int getSolvedFunctionIndex() |
|
584 |
protected int getSolvedFunctionIndex()
|
|
582 | 585 |
{ |
583 | 586 |
return 0; |
584 | 587 |
} |
585 | 588 |
|
586 | 589 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
587 | 590 |
|
588 |
int getNumCubitFaces() |
|
591 |
protected int getNumCubitFaces()
|
|
589 | 592 |
{ |
590 | 593 |
return 6; |
591 | 594 |
} |
Also available in: Unified diff
Refactoring: split the 'objects' package into two, 'objects' and 'objectlib'.
The point: we're going to need to move the 'objectlib' stuff into its own library module, and that's because we're going to create a new app module which needs access to it.