Revision e6cf7283
Added by Leszek Koltunski about 3 years ago
src/main/java/org/distorted/objects/TwistyRedi.java | ||
---|---|---|
80 | 80 |
private static final float DIST_EDGE = 1.5f; |
81 | 81 |
|
82 | 82 |
// centers of the 8 corners + 12 edges ( i.e. of the all 20 cubits) |
83 |
private static final Static3D[] CENTERS = new Static3D[]
|
|
83 |
private static final float[][] CENTERS = new float[][]
|
|
84 | 84 |
{ |
85 |
new Static3D( DIST_CORNER, DIST_CORNER, DIST_CORNER ),
|
|
86 |
new Static3D( DIST_CORNER, DIST_CORNER,-DIST_CORNER ),
|
|
87 |
new Static3D( DIST_CORNER,-DIST_CORNER, DIST_CORNER ),
|
|
88 |
new Static3D( DIST_CORNER,-DIST_CORNER,-DIST_CORNER ),
|
|
89 |
new Static3D(-DIST_CORNER, DIST_CORNER, DIST_CORNER ),
|
|
90 |
new Static3D(-DIST_CORNER, DIST_CORNER,-DIST_CORNER ),
|
|
91 |
new Static3D(-DIST_CORNER,-DIST_CORNER, DIST_CORNER ),
|
|
92 |
new Static3D(-DIST_CORNER,-DIST_CORNER,-DIST_CORNER ),
|
|
93 |
|
|
94 |
new Static3D( 0.0f, DIST_EDGE, DIST_EDGE ),
|
|
95 |
new Static3D( DIST_EDGE, 0.0f, DIST_EDGE ),
|
|
96 |
new Static3D( 0.0f,-DIST_EDGE, DIST_EDGE ),
|
|
97 |
new Static3D(-DIST_EDGE, 0.0f, DIST_EDGE ),
|
|
98 |
new Static3D( DIST_EDGE, DIST_EDGE, 0.0f ),
|
|
99 |
new Static3D( DIST_EDGE,-DIST_EDGE, 0.0f ),
|
|
100 |
new Static3D(-DIST_EDGE,-DIST_EDGE, 0.0f ),
|
|
101 |
new Static3D(-DIST_EDGE, DIST_EDGE, 0.0f ),
|
|
102 |
new Static3D( 0.0f, DIST_EDGE,-DIST_EDGE ),
|
|
103 |
new Static3D( DIST_EDGE, 0.0f,-DIST_EDGE ),
|
|
104 |
new Static3D( 0.0f,-DIST_EDGE,-DIST_EDGE ),
|
|
105 |
new Static3D(-DIST_EDGE, 0.0f,-DIST_EDGE )
|
|
85 |
{ DIST_CORNER, DIST_CORNER, DIST_CORNER },
|
|
86 |
{ DIST_CORNER, DIST_CORNER,-DIST_CORNER },
|
|
87 |
{ DIST_CORNER,-DIST_CORNER, DIST_CORNER },
|
|
88 |
{ DIST_CORNER,-DIST_CORNER,-DIST_CORNER },
|
|
89 |
{-DIST_CORNER, DIST_CORNER, DIST_CORNER },
|
|
90 |
{-DIST_CORNER, DIST_CORNER,-DIST_CORNER },
|
|
91 |
{-DIST_CORNER,-DIST_CORNER, DIST_CORNER },
|
|
92 |
{-DIST_CORNER,-DIST_CORNER,-DIST_CORNER },
|
|
93 |
|
|
94 |
{ 0.0f, DIST_EDGE, DIST_EDGE },
|
|
95 |
{ DIST_EDGE, 0.0f, DIST_EDGE },
|
|
96 |
{ 0.0f,-DIST_EDGE, DIST_EDGE },
|
|
97 |
{-DIST_EDGE, 0.0f, DIST_EDGE },
|
|
98 |
{ DIST_EDGE, DIST_EDGE, 0.0f },
|
|
99 |
{ DIST_EDGE,-DIST_EDGE, 0.0f },
|
|
100 |
{-DIST_EDGE,-DIST_EDGE, 0.0f },
|
|
101 |
{-DIST_EDGE, DIST_EDGE, 0.0f },
|
|
102 |
{ 0.0f, DIST_EDGE,-DIST_EDGE },
|
|
103 |
{ DIST_EDGE, 0.0f,-DIST_EDGE },
|
|
104 |
{ 0.0f,-DIST_EDGE,-DIST_EDGE },
|
|
105 |
{-DIST_EDGE, 0.0f,-DIST_EDGE }
|
|
106 | 106 |
}; |
107 | 107 |
|
108 | 108 |
// Colors of the faces of cubits. |
... | ... | |
199 | 199 |
|
200 | 200 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
201 | 201 |
|
202 |
Static3D[] getCubitPositions(int size)
|
|
202 |
float[][] getCubitPositions(int size)
|
|
203 | 203 |
{ |
204 | 204 |
return CENTERS; |
205 | 205 |
} |
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.