Project

General

Profile

« Previous | Next » 

Revision f2d0d23e

Added by Leszek Koltunski over 2 years ago

Remove statics from the Bandaged Cube classes.

View differences:

src/main/java/org/distorted/objects/TwistyBandagedEvil.java
32 32

  
33 33
class TwistyBandagedEvil extends TwistyBandagedAbstract
34 34
{
35
  private static final float[][] POSITIONS = new float[][]
36
      {
37
        { 1.0f,  1.0f, -1.0f},
38
        {-1.0f, -1.0f,  0.0f, -1.0f,  0.0f,  0.0f, 0.0f, -1.0f,  0.0f,  0.0f,  0.0f,  0.0f},
39
        {-1.0f,  1.0f, -1.0f,  0.0f,  1.0f, -1.0f},
40
        {-1.0f,  0.0f, -1.0f,  0.0f,  0.0f, -1.0f},
41
        {-1.0f, -1.0f, -1.0f,  0.0f, -1.0f, -1.0f},
42
        {-1.0f,  1.0f,  0.0f, -1.0f,  1.0f,  1.0f},
43
        { 0.0f,  1.0f,  0.0f,  0.0f,  1.0f,  1.0f},
44
        { 1.0f,  1.0f,  0.0f,  1.0f,  1.0f,  1.0f},
45
        {-1.0f, -1.0f,  1.0f, -1.0f,  0.0f,  1.0f},
46
        { 0.0f, -1.0f,  1.0f,  0.0f,  0.0f,  1.0f},
47
        { 1.0f, -1.0f,  1.0f,  1.0f,  0.0f,  1.0f},
48
        { 1.0f, -1.0f,  0.0f,  1.0f,  0.0f,  0.0f},
49
        { 1.0f, -1.0f, -1.0f,  1.0f,  0.0f, -1.0f}
50
      };
51

  
52
  private static final int[] QUAT_INDICES = new int[]
53
      { 0, 1, 0, 0, 0, 2, 2, 2, 3, 3, 3, 3, 3 };
54

  
55
///////////////////////////////////////////////////////////////////////////////////////////////////
56

  
57 35
  TwistyBandagedEvil(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
58 36
                     DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
59 37
    {
......
207 185
     new ScrambleState( new int[][] {{}                          , {2, 1,  1}                  , {2, 2, 12,2,-1, 13} })
208 186
     };
209 187
    }
210

  
211 188
///////////////////////////////////////////////////////////////////////////////////////////////////
212 189

  
213 190
  float[][] getPositions()
214 191
    {
192
    if( POSITIONS==null )
193
      {
194
      POSITIONS = new float[][]
195
        {
196
          { 1.0f,  1.0f, -1.0f},
197
          {-1.0f, -1.0f,  0.0f, -1.0f,  0.0f,  0.0f, 0.0f, -1.0f,  0.0f,  0.0f,  0.0f,  0.0f},
198
          {-1.0f,  1.0f, -1.0f,  0.0f,  1.0f, -1.0f},
199
          {-1.0f,  0.0f, -1.0f,  0.0f,  0.0f, -1.0f},
200
          {-1.0f, -1.0f, -1.0f,  0.0f, -1.0f, -1.0f},
201
          {-1.0f,  1.0f,  0.0f, -1.0f,  1.0f,  1.0f},
202
          { 0.0f,  1.0f,  0.0f,  0.0f,  1.0f,  1.0f},
203
          { 1.0f,  1.0f,  0.0f,  1.0f,  1.0f,  1.0f},
204
          {-1.0f, -1.0f,  1.0f, -1.0f,  0.0f,  1.0f},
205
          { 0.0f, -1.0f,  1.0f,  0.0f,  0.0f,  1.0f},
206
          { 1.0f, -1.0f,  1.0f,  1.0f,  0.0f,  1.0f},
207
          { 1.0f, -1.0f,  0.0f,  1.0f,  0.0f,  0.0f},
208
          { 1.0f, -1.0f, -1.0f,  1.0f,  0.0f, -1.0f}
209
        };
210
      }
215 211
    return POSITIONS;
216 212
    }
217 213

  
......
219 215

  
220 216
  int[] getQuatIndices()
221 217
    {
218
    if( QUAT_INDICES==null )
219
      {
220
      QUAT_INDICES = new int[] { 0, 1, 0, 0, 0, 2, 2, 2, 3, 3, 3, 3, 3 };
221
      }
222

  
222 223
    return QUAT_INDICES;
223 224
    }
224 225

  

Also available in: Unified diff