Project

General

Profile

« Previous | Next » 

Revision 00f4980d

Added by Leszek Koltunski over 2 years ago

Progress standarising stickering - adjust sticker radii based on cos of the angle at the sticker vertex.

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyRedi.java
416 416
    return ObjectControl.isInIconMode() ? 0.20f : 0.09f;
417 417
    }
418 418

  
419
///////////////////////////////////////////////////////////////////////////////////////////////////
420

  
421
  private float[][] getAngles()
422
    {
423
    return null;
424
    }
425

  
419 426
///////////////////////////////////////////////////////////////////////////////////////////////////
420 427

  
421 428
  public ObjectSticker retSticker(int sticker)
......
424 431
      {
425 432
      float rad = getRadius();
426 433
      float str = getStroke();
434
      float[][] angles = getAngles();
427 435
      int numStickers = mStickerCoords.length;
428 436
      mStickers = new ObjectSticker[numStickers];
429 437

  
......
432 440
        float scale = mStickerScales[s];
433 441
        float radius = rad / scale;
434 442
        float stroke = str / scale;
435
        int len = mStickerCoords[s].length;
443
        int len = mStickerCoords[s].length/2;
436 444
        float[] radii = new float[len];
437
        for(int r=0; r<len; r++) radii[r] = radius;
438
        mStickers[s] = new ObjectSticker(mStickerCoords[s],null,radii,stroke);
445
        for(int r=0; r<len; r++) radii[r] = radius*computeRadiusCorrection(mStickerCoords[s],r,len);
446
        mStickers[s] = new ObjectSticker(mStickerCoords[s],angles==null ? null : angles[s],radii,stroke);
439 447
        }
440 448
      }
441 449

  

Also available in: Unified diff