Project

General

Profile

« Previous | Next » 

Revision 668423be

Added by Leszek Koltunski over 3 years ago

Add flag of Madagascar.

View differences:

src/main/java/org/distorted/objects/TwistyDiamond.java
544 544
///////////////////////////////////////////////////////////////////////////////////////////////////
545 545
// The Diamond is solved if and only if:
546 546
//
547
// 1) all octahedrons are rotated with the same quat
548
// 2) all tetrahedrons might be also optionally rotated by a 'face neutral' pair of quats
549
//    (indexes of those are kept in the 'mFaceNeutralQuattIndex' table)
550
//
551
// Note: this works for any size, because even if layers>3 - and then there are 'face-internal'
552
// octahedrons which, it would seem, can be rotated by those 'face neutral' pairs of quats - but
553
// in reality no, because if they were, the octahedrons would then not fit in the lattice...
547
// - all cubits are rotated by the same quat
548
// - those which are internal to the side, i.e. those which have only one 'non-black' face, might
549
//   also be optionally rotated by one of the two quats whose axis is perpendicular to the face.
550
//   (including some octahedrons if numLayers>=4)
554 551

  
555 552
  public boolean isSolved()
556 553
    {
......
572 569
      q2Index = mFaceNeutralQuatIndex[face][1];
573 570
      qI      = CUBITS[i].mQuatIndex;
574 571

  
575
      if(  qI != q && qI != mulQuat(q,q1Index) && qI != mulQuat(q,q2Index) ) return false;
572
      if( qI != q && qI != mulQuat(q,q1Index) && qI != mulQuat(q,q2Index) ) return false;
576 573
      }
577 574

  
578 575
    return true;
src/main/java/org/distorted/objects/TwistyJing.java
315 315
      }
316 316
    else
317 317
      {
318
      float[][] bands     = new float[][] { {0.020f,35,0.20f*(1-3*F),0.6f*(1-3*F),5,1,1},
319
                                              {0.001f,35,0.05f*(1-3*F),0.1f*(1-3*F),5,1,1} };
318
      float[][] bands     = new float[][] { {0.020f,35,0.20f*(1-3*F),0.6f*(1-3*F),5,1,1}, {0.001f,35,0.05f*(1-3*F),0.1f*(1-3*F),5,1,1} };
320 319
      int[] bandIndices   = new int[] { 0,1,1,1,1,1 };
321 320
      float[][] corners   = new float[][] { {0.04f,0.15f} };
322 321
      int[] cornerIndices = new int[] { 0,0,0,-1,-1,-1 };
src/main/java/org/distorted/objects/TwistyRedi.java
252 252

  
253 253
  float[][] getCuts(int size)
254 254
    {
255
    float[] cut = new float[] { -SQ3/3 -0.05f, +SQ3/3 +0.05f };
255
    float C = +SQ3/3 +0.05f;
256
    float[] cut = new float[] {-C,+C};
256 257
    return new float[][] { cut,cut,cut,cut };
257 258
    }
258 259

  
......
278 279

  
279 280
    if( variant==0 )
280 281
      {
281
      float[][] bands= new float[][]
282
          {
283
            {0.06f,35,0.5f,0.7f,5,2,2},
284
            {0.01f,35,0.2f,0.4f,5,2,2}
285
          };
282
      float[][] bands     = new float[][] { {0.06f,35,0.5f,0.7f,5,2,2}, {0.01f,35,0.2f,0.4f,5,2,2} };
286 283
      int[] bandIndices   = new int[] { 0,0,0,1,1,1,1,1,1 };
287 284
      float[][] corners   = new float[][] { {0.06f,0.12f} };
288 285
      int[] cornerIndices = new int[]  { -1,0,-1,0,0,0,-1,-1 };
289 286
      float[][] centers   = new float[][] { { 0.0f, 0.0f, 0.0f} };
290 287
      int[] centerIndices = new int[] { -1,0,-1,0,0,0,-1,-1 };
291

  
292 288
      return new ObjectShape(VERTICES_CORNER,VERT_INDEXES_CORNER,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null);
293 289
      }
294 290
    else
295 291
      {
296
      float[][] bands= new float[][]
297
          {
298
            {0.038f,35,0.250f,0.7f, 7,2,2},
299
            {0.020f,35,0.125f,0.2f, 3,1,2},
300
            {0.020f,35,0.125f,0.2f, 3,1,1}
301
          };
292
      float[][] bands     = new float[][] { {0.038f,35,0.250f,0.7f,7,2,2}, {0.020f,35,0.125f,0.2f,3,1,2}, {0.020f,35,0.125f,0.2f,3,1,1} };
302 293
      int[] bandIndices   = new int[] { 0,0,1,1,2,2 };
303 294
      float[][] corners   = new float[][] { {0.06f,0.20f} };
304 295
      int[] cornerIndices = new int[] { 0,0,-1,-1,-1,-1,-1,-1 };
305 296
      float[][] centers   = new float[][] { { 0.0f,-0.75f,-0.75f} };
306 297
      int[] centerIndices = new int[] { 0,0,-1,-1,-1,-1,-1,-1 };
307

  
308 298
      return new ObjectShape(VERTICES_EDGE,VERT_INDEXES_EDGE,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null);
309 299
      }
310 300
    }
src/main/java/org/distorted/objects/TwistySkewb.java
21 21

  
22 22
import android.content.res.Resources;
23 23

  
24
import org.distorted.helpers.FactoryCubit;
25 24
import org.distorted.helpers.ObjectShape;
26 25
import org.distorted.helpers.ObjectSticker;
27
import org.distorted.library.effect.MatrixEffectQuaternion;
28 26
import org.distorted.library.main.DistortedEffects;
29 27
import org.distorted.library.main.DistortedTexture;
30
import org.distorted.library.mesh.MeshBase;
31 28
import org.distorted.library.mesh.MeshSquare;
32 29
import org.distorted.library.type.Static3D;
33 30
import org.distorted.library.type.Static4D;

Also available in: Unified diff