Project

General

Profile

« Previous | Next » 

Revision a64e07d0

Added by Leszek Koltunski over 3 years ago

Beginnings of Megaminx & Gigaminx

View differences:

src/main/java/org/distorted/objects/TwistyObject.java
79 79
  private static final float MAX_SIZE_CHANGE = 1.35f;
80 80
  private static final float MIN_SIZE_CHANGE = 0.75f;
81 81

  
82
  private static final boolean mCreateFromDMesh = true;
82
  private static final boolean mCreateFromDMesh = false;
83 83

  
84 84
  private static final Static3D CENTER = new Static3D(0,0,0);
85 85
  private static final int POST_ROTATION_MILLISEC = 500;
......
144 144
    mInitScreenRatio = getScreenRatio();
145 145
    NUM_FACES = getNumFaces();
146 146
    NUM_CUBIT_FACES = getNumCubitFaces();
147
    NUM_TEXTURES = getNumStickerTypes()*NUM_FACES;
147
    NUM_TEXTURES = getNumStickerTypes(mNumLayers)*NUM_FACES;
148 148
    CUTS = getCuts(mNumLayers);
149 149
    NUM_CUTS = CUTS.length;
150 150

  
......
156 156
    mNodeScale= new Static3D(1,NODE_RATIO,1);
157 157
    mQuat = quat;
158 158

  
159
    mRowChances = getRowChances();
159
    mRowChances = getRowChances(mNumLayers);
160 160

  
161 161
    mRotationAngle= new Dynamic1D();
162 162
    mRotationAxis = new Static3D(1,0,0);
......
245 245
      for(int i=0; i<NUM_CUBITS; i++)
246 246
        {
247 247
        CUBITS[i] = new Cubit(this,mOrigPos[i]);
248
        cubitMesh[i] = createCubitMesh(i);
248
        cubitMesh[i] = createCubitMesh(i,mNumLayers);
249 249
        cubitMesh[i].apply(new MatrixEffectMove(mOrigPos[i]),1,0);
250 250
        cubitMesh[i].setEffectAssociation(0, CUBITS[i].computeAssociation(), 0);
251 251
        }
......
763 763
  abstract Static3D[] getCubitPositions(int numLayers);
764 764
  abstract Static4D[] getQuats();
765 765
  abstract int getNumFaces();
766
  abstract int getNumStickerTypes();
766
  abstract int getNumStickerTypes(int numLayers);
767 767
  abstract int getNumCubitFaces();
768
  abstract MeshBase createCubitMesh(int cubit);
768
  abstract MeshBase createCubitMesh(int cubit, int numLayers);
769 769
  abstract void createFaceTexture(Canvas canvas, Paint paint, int face, int left, int top);
770 770
  abstract int getFaceColor(int cubit, int cubitface, int numLayers);
771 771
  abstract float returnMultiplier();
772
  abstract float[] getRowChances();
772
  abstract float[] getRowChances(int numLayers);
773 773
  abstract float[] getCuts(int numLayers);
774 774
  abstract boolean shouldResetTextureMaps();
775 775

  

Also available in: Unified diff