Project

General

Profile

« Previous | Next » 

Revision 3f7fad4f

Added by Leszek Koltunski over 2 years ago

Add Cube6.

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java
263 263
      }
264 264
    else
265 265
      {
266
      int extraI2, extraV2, num2;
267

  
268
      switch(numL)
269
        {
270
        case 2 : num2 = 6; extraI2 = 2; extraV2 = 2; break;
271
        case 3 : num2 = 5; extraI2 = 1; extraV2 = 0; break;
272
        case 4 : num2 = 4; extraI2 = 0; extraV2 = 0; break;
273
        default: num2 = 3; extraI2 = 0; extraV2 = 0; break;
274
        }
266
      int extraI2 = numL<=3 ? num-2 : 0;
275 267

  
276 268
      float[][] bands   = new float[][]
277 269
        {
278
          {height,35,0.5f,0.7f,num ,extraI ,extraV },
279
          {height,35,0.5f,0.7f,num2,extraI2,extraV2},
280
          {height,35,0.5f,0.7f,   2,      0,      0},
270
          {height,35,0.5f,0.7f,num,extraI ,extraV},
271
          {height,35,0.5f,0.7f,  2,extraI2,     0},
272
          {height,35,0.5f,0.7f,  2,      0,     0},
281 273
        };
282 274
      int[] bandIndices = new int[] { 1,1,1,1,0,2};
283 275
      return new ObjectShape(vertices,vert_indices,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null);
......
449 441

  
450 442
  public int getVariantFaceColor(int variant, int face, int[] numLayers)
451 443
    {
452
    return (variant==0 || face==4) ? 0 : -1;
444
    return 0;
453 445
    }
454 446

  
455 447
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff