Project

General

Profile

« Previous | Next » 

Revision 8f5116ec

Added by Leszek Koltunski 2 months ago

Major improvement for the FactorySticker: now all changes to border thickness & size of corners should work.

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyO2.java
59 59
    }
60 60

  
61 61
///////////////////////////////////////////////////////////////////////////////////////////////////
62
// ditto, manually provide the sticker coordinates.
63 62

  
64 63
  @Override
65 64
  public void adjustStickerCoords()
......
69 68
    final float C = 0.50f;
70 69

  
71 70
    // stickers with holes are not collapsed into one; we need to repeat this 6 times
72
    float[][][] t = new float[][][] { { { A,-A},{A,A},{-A, A},{-A,-A} } , { {B,0},{-B,0} } };
73
    mStickerCoords = new float[][][][] { t,t,t,t,t,t, { { { C,0},{-C,0} } } };
71
    // the hole loop needs to be first so that FactorySticker draws it first; otherwise there's a
72
    // slight artifact.
73
    float[][][] t = new float[][][] {  {{B,0},{-B,0}} , {{ A,-A},{A,A},{-A, A},{-A,-A}} };
74
    mStickerCoords = new float[][][][] { t,t,t,t,t,t, {{{ C,0},{-C,0}}} };
74 75
  }
75 76

  
76 77
///////////////////////////////////////////////////////////////////////////////////////////////////
77 78

  
78 79
  public float[][][] getStickerAngles()
79 80
    {
80
    float A = (float)(Math.PI/2);
81
    float[][] t = new float[][] { {0,0,0,0},{-A,-A} };
81
    float A = (float)(Math.PI*0.999f);
82
    float[][] t = new float[][] { {-A,-A},{0,0,0,0} };
82 83
    return new float[][][] { t,t,t,t,t,t,{{A,A}} };
83 84
    }
84 85

  

Also available in: Unified diff