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/TwistyBandagedFused.java
32 32

  
33 33
class TwistyBandagedFused extends TwistyBandagedAbstract
34 34
{
35
  private static final float[][] POSITIONS = new float[][]
36
      {
37
       {-1.0f, -1.0f, +0.0f,
38
        -1.0f, -1.0f, +1.0f,
39
        -1.0f,  0.0f, +0.0f,
40
        -1.0f,  0.0f, +1.0f,
41
         0.0f, -1.0f, +0.0f,
42
         0.0f, -1.0f, +1.0f,
43
         0.0f,  0.0f, +0.0f,
44
         0.0f,  0.0f, +1.0f},
45
       {-1.0f, +1.0f, +1.0f},
46
       {-1.0f, +1.0f, +0.0f},
47
       {-1.0f, +1.0f, -1.0f},
48
       { 0.0f, +1.0f, +1.0f},
49
       { 0.0f, +1.0f, +0.0f},
50
       { 0.0f, +1.0f, -1.0f},
51
       { 1.0f, +1.0f, +1.0f},
52
       { 1.0f, +1.0f, +0.0f},
53
       { 1.0f, +1.0f, -1.0f},
54
       { 1.0f,  0.0f, +1.0f},
55
       { 1.0f,  0.0f, +0.0f},
56
       { 1.0f,  0.0f, -1.0f},
57
       { 1.0f, -1.0f, +1.0f},
58
       { 1.0f, -1.0f, +0.0f},
59
       { 1.0f, -1.0f, -1.0f},
60
       {-1.0f, -1.0f, -1.0f},
61
       {-1.0f,  0.0f, -1.0f},
62
       { 0.0f, -1.0f, -1.0f},
63
       { 0.0f,  0.0f, -1.0f}
64
      };
65

  
66
  private static final int[] QUAT_INDICES = new int[] { 0 };
67

  
68
///////////////////////////////////////////////////////////////////////////////////////////////////
69

  
70 35
  TwistyBandagedFused(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
71 36
                      DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
72 37
    {
......
84 49

  
85 50
  float[][] getPositions()
86 51
    {
52
    if( POSITIONS==null )
53
      {
54
      POSITIONS = new float[][]
55
        {
56
          {-1.0f, -1.0f, +0.0f,
57
           -1.0f, -1.0f, +1.0f,
58
           -1.0f,  0.0f, +0.0f,
59
           -1.0f,  0.0f, +1.0f,
60
            0.0f, -1.0f, +0.0f,
61
            0.0f, -1.0f, +1.0f,
62
            0.0f,  0.0f, +0.0f,
63
            0.0f,  0.0f, +1.0f},
64
          {-1.0f, +1.0f, +1.0f},
65
          {-1.0f, +1.0f, +0.0f},
66
          {-1.0f, +1.0f, -1.0f},
67
          { 0.0f, +1.0f, +1.0f},
68
          { 0.0f, +1.0f, +0.0f},
69
          { 0.0f, +1.0f, -1.0f},
70
          { 1.0f, +1.0f, +1.0f},
71
          { 1.0f, +1.0f, +0.0f},
72
          { 1.0f, +1.0f, -1.0f},
73
          { 1.0f,  0.0f, +1.0f},
74
          { 1.0f,  0.0f, +0.0f},
75
          { 1.0f,  0.0f, -1.0f},
76
          { 1.0f, -1.0f, +1.0f},
77
          { 1.0f, -1.0f, +0.0f},
78
          { 1.0f, -1.0f, -1.0f},
79
          {-1.0f, -1.0f, -1.0f},
80
          {-1.0f,  0.0f, -1.0f},
81
          { 0.0f, -1.0f, -1.0f},
82
          { 0.0f,  0.0f, -1.0f}
83
        };
84
      }
87 85
    return POSITIONS;
88 86
    }
89 87

  
......
91 89

  
92 90
  int[] getQuatIndices()
93 91
    {
92
    if( QUAT_INDICES==null )
93
      {
94
      QUAT_INDICES = new int[] { 0 };
95
      }
96

  
94 97
    return QUAT_INDICES;
95 98
    }
96 99

  

Also available in: Unified diff