Revision e6cf7283
Added by Leszek Koltunski about 3 years ago
src/main/java/org/distorted/objects/TwistyCube.java | ||
---|---|---|
136 | 136 |
|
137 | 137 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
138 | 138 |
|
139 |
Static3D[] getCubitPositions(int size)
|
|
139 |
float[][] getCubitPositions(int size)
|
|
140 | 140 |
{ |
141 | 141 |
int numCubits = size>1 ? 6*size*size - 12*size + 8 : 1; |
142 |
Static3D[] tmp = new Static3D[numCubits];
|
|
142 |
float[][] tmp = new float[numCubits][];
|
|
143 | 143 |
|
144 | 144 |
float diff = 0.5f*(size-1); |
145 | 145 |
int currentPosition = 0; |
... | ... | |
149 | 149 |
for(int z = 0; z<size; z++) |
150 | 150 |
if( x==0 || x==size-1 || y==0 || y==size-1 || z==0 || z==size-1 ) |
151 | 151 |
{ |
152 |
tmp[currentPosition++] = new Static3D(x-diff,y-diff,z-diff);
|
|
152 |
tmp[currentPosition++] = new float[] {x-diff,y-diff,z-diff};
|
|
153 | 153 |
} |
154 | 154 |
|
155 | 155 |
return tmp; |
Also available in: Unified diff
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.