Project

General

Profile

« Previous | Next » 

Revision e6cf7283

Added by Leszek Koltunski about 3 years ago

Change the Cubit center from a Static3D to a float[].
The point: now we can have more than one center, and bandaged objects need more than one, because in this way they are going to fill up their RotationRow bitmaps.

View differences:

src/main/java/org/distorted/objects/TwistyDiamond.java
81 81
  private static final float DIST = 0.50f;
82 82

  
83 83
  // centers of the 6 octahedrons + 8 tetrahedrons ( i.e. of the all 14 cubits)
84
  private static final Static3D[] CENTERS = new Static3D[]
84
  private static final float[][] CENTERS = new float[][]
85 85
         {
86
           new Static3D( DIST,          0, DIST ),
87
           new Static3D( DIST,          0,-DIST ),
88
           new Static3D(-DIST,          0,-DIST ),
89
           new Static3D(-DIST,          0, DIST ),
90
           new Static3D(    0, DIST*SQ2  ,    0 ),
91
           new Static3D(    0,-DIST*SQ2  ,    0 ),
92

  
93
           new Static3D(    0, DIST*SQ2/2, DIST ),
94
           new Static3D( DIST, DIST*SQ2/2,    0 ),
95
           new Static3D(    0, DIST*SQ2/2,-DIST ),
96
           new Static3D(-DIST, DIST*SQ2/2,    0 ),
97
           new Static3D(    0,-DIST*SQ2/2, DIST ),
98
           new Static3D( DIST,-DIST*SQ2/2,    0 ),
99
           new Static3D(    0,-DIST*SQ2/2,-DIST ),
100
           new Static3D(-DIST,-DIST*SQ2/2,    0 )
86
             { DIST,          0, DIST },
87
             { DIST,          0,-DIST },
88
             {-DIST,          0,-DIST },
89
             {-DIST,          0, DIST },
90
             {    0, DIST*SQ2  ,    0 },
91
             {    0,-DIST*SQ2  ,    0 },
92

  
93
             {    0, DIST*SQ2/2, DIST },
94
             { DIST, DIST*SQ2/2,    0 },
95
             {    0, DIST*SQ2/2,-DIST },
96
             {-DIST, DIST*SQ2/2,    0 },
97
             {    0,-DIST*SQ2/2, DIST },
98
             { DIST,-DIST*SQ2/2,    0 },
99
             {    0,-DIST*SQ2/2,-DIST },
100
             {-DIST,-DIST*SQ2/2,    0 }
101 101
         };
102 102

  
103 103
  // Colors of the faces of cubits. Each cubit has 8 faces
......
183 183

  
184 184
///////////////////////////////////////////////////////////////////////////////////////////////////
185 185

  
186
  Static3D[] getCubitPositions(int size)
186
  float[][] getCubitPositions(int size)
187 187
    {
188 188
    return CENTERS;
189 189
    }

Also available in: Unified diff