Project

General

Profile

« Previous | Next » 

Revision d0f4d205

Added by Leszek Koltunski over 2 years ago

Improve stickering - while drawing a sticker, set stencil to its area so the drawing does not encroach on the neighbouring stickers.

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java
125 125
    return status<0 ? null : buildSolvedQuats(TouchControlHexahedron.FACE_AXIS[status],mQuats);
126 126
    }
127 127

  
128
///////////////////////////////////////////////////////////////////////////////////////////////////
129
/*
130
  int getNumCubits()
131
    {
132
    return getPositions().length;
133
    }
134
*/
135 128
///////////////////////////////////////////////////////////////////////////////////////////////////
136 129

  
137 130
  private float[] getCubitPosition(int cubit)
......
320 313

  
321 314
  public float[][] getCubitPositions(int[] numLayers)
322 315
    {
323
    /*
324
    int numCubits = getNumCubits();
325
    float[][] tmp = new float[numCubits][];
326

  
327
    for(int cubit=0; cubit<numCubits; cubit++)
328
      {
329
      tmp[cubit] = getCubitPosition(cubit);
330
      }
331

  
332
    return tmp;
333

  
334
     */
335

  
336 316
    return getPositions();
337 317
    }
338 318

  
......
429 409
    return 6;
430 410
    }
431 411

  
432
///////////////////////////////////////////////////////////////////////////////////////////////////
433

  
434
  private int retStickerIndex(int horzSize, int vertSize)
435
    {
436
    switch(horzSize)
437
      {
438
      case 1: return 0;
439
      case 2: return vertSize==1 ? 1:3;
440
      case 3: return 2;
441
      }
442

  
443
    return 0;
444
    }
445

  
446 412
///////////////////////////////////////////////////////////////////////////////////////////////////
447 413

  
448 414
  public int getVariantFaceColor(int variant, int face, int[] numLayers)
449 415
    {
450 416
    return mStickerVariants[variant][face];
451
    /*
452
    int[] dim = mDimensions[variant];
453

  
454
    switch(face)
455
      {
456
      case 0: case 1: return retStickerIndex(dim[2],dim[1]);
457
      case 2: case 3: return retStickerIndex(dim[0],dim[2]);
458
      case 4: case 5: return retStickerIndex(dim[0],dim[1]);
459
      }
460

  
461
    return 0;
462

  
463
     */
464 417
    }
465 418

  
466 419
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff