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

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

  
56
  private static final int[] QUAT_INDICES = new int[] { 1, 3 };
57

  
58
///////////////////////////////////////////////////////////////////////////////////////////////////
59

  
60 35
  TwistyBandaged3Plate(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
61 36
                       DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
62 37
    {
......
87 62

  
88 63
  float[][] getPositions()
89 64
    {
65
    if( POSITIONS==null )
66
      {
67
      POSITIONS = new float[][]
68
        {
69
          {-1.0f,  1.0f,  1.0f, -1.0f,  0.0f,  1.0f,  0.0f,  1.0f,  1.0f,  0.0f,  0.0f,  1.0f},
70
          { 1.0f,  0.0f, -1.0f,  1.0f,  0.0f,  0.0f,  1.0f,  1.0f, -1.0f,  1.0f,  1.0f,  0.0f},
71
          {-1.0f, -1.0f, -1.0f, -1.0f, -1.0f,  0.0f,  0.0f, -1.0f, -1.0f,  0.0f, -1.0f,  0.0f},
72
          { 1.0f,  1.0f,  1.0f},
73
          { 1.0f,  0.0f,  1.0f},
74
          { 1.0f, -1.0f,  1.0f},
75
          {-1.0f, -1.0f,  1.0f},
76
          { 0.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,  1.0f,  0.0f},
81
          { 0.0f,  1.0f, -1.0f},
82
          { 0.0f,  1.0f,  0.0f},
83
          {-1.0f,  0.0f, -1.0f},
84
          {-1.0f,  0.0f,  0.0f},
85
          { 0.0f,  0.0f, -1.0f}
86
        };
87
      }
90 88
    return POSITIONS;
91 89
    }
92 90

  
......
94 92

  
95 93
  int[] getQuatIndices()
96 94
    {
95
    if( QUAT_INDICES==null )
96
      {
97
      QUAT_INDICES = new int[] { 1,3 };
98
      }
99

  
97 100
    return QUAT_INDICES;
98 101
    }
99 102

  

Also available in: Unified diff