Revision 347f6cc1
Added by Leszek Koltunski 12 months ago
src/main/java/org/distorted/objectlib/objects/TwistyCoinHexahedron.java | ||
---|---|---|
196 | 196 |
{ |
197 | 197 |
if( mPosition==null ) |
198 | 198 |
{ |
199 |
final float A = 1.5f-C; |
|
200 |
final float B = 1.52f; |
|
199 |
final float A = 1.49f-C; |
|
200 |
final float B = 1.50f; |
|
201 |
final float Z = 1.50f; |
|
201 | 202 |
final float E = 0.75f*D; |
202 | 203 |
|
203 | 204 |
mPosition = new float[][] |
... | ... | |
218 | 219 |
{ B, 0, 0 }, |
219 | 220 |
{-B, 0, 0 }, |
220 | 221 |
|
221 |
{ E, E, B},
|
|
222 |
{ E,-E, B},
|
|
223 |
{-E, E, B},
|
|
224 |
{-E,-E, B},
|
|
225 |
{ E, E,-B},
|
|
226 |
{ E,-E,-B},
|
|
227 |
{-E, E,-B},
|
|
228 |
{-E,-E,-B},
|
|
229 |
{ E, B, E},
|
|
230 |
{ E, B,-E},
|
|
231 |
{-E, B, E},
|
|
232 |
{-E, B,-E},
|
|
233 |
{ E,-B, E},
|
|
234 |
{ E,-B,-E},
|
|
235 |
{-E,-B, E},
|
|
236 |
{-E,-B,-E},
|
|
237 |
{ B, E, E},
|
|
238 |
{ B, E,-E},
|
|
239 |
{ B,-E, E},
|
|
240 |
{ B,-E,-E},
|
|
241 |
{-B, E, E},
|
|
242 |
{-B, E,-E},
|
|
243 |
{-B,-E, E},
|
|
244 |
{-B,-E,-E},
|
|
222 |
{ E, E, Z},
|
|
223 |
{ E,-E, Z},
|
|
224 |
{-E, E, Z},
|
|
225 |
{-E,-E, Z},
|
|
226 |
{ E, E,-Z},
|
|
227 |
{ E,-E,-Z},
|
|
228 |
{-E, E,-Z},
|
|
229 |
{-E,-E,-Z},
|
|
230 |
{ E, Z, E},
|
|
231 |
{ E, Z,-E},
|
|
232 |
{-E, Z, E},
|
|
233 |
{-E, Z,-E},
|
|
234 |
{ E,-Z, E},
|
|
235 |
{ E,-Z,-E},
|
|
236 |
{-E,-Z, E},
|
|
237 |
{-E,-Z,-E},
|
|
238 |
{ Z, E, E},
|
|
239 |
{ Z, E,-E},
|
|
240 |
{ Z,-E, E},
|
|
241 |
{ Z,-E,-E},
|
|
242 |
{-Z, E, E},
|
|
243 |
{-Z, E,-E},
|
|
244 |
{-Z,-E, E},
|
|
245 |
{-Z,-E,-E},
|
|
245 | 246 |
}; |
246 | 247 |
} |
247 | 248 |
|
... | ... | |
457 | 458 |
int[][] ret = new int[1+4*N][]; |
458 | 459 |
|
459 | 460 |
ret[0] = new int[4*N]; |
460 |
for(int i=0; i<4*N; i++) ret[0][i] = 4*N-1-i;
|
|
461 |
for(int i=0; i<4*N; i++) ret[0][i] = i; |
|
461 | 462 |
|
462 | 463 |
for(int i=0; i<N; i++) |
463 | 464 |
{ |
... | ... | |
552 | 553 |
} |
553 | 554 |
else if( variant==1 ) |
554 | 555 |
{ |
555 |
float h1 = isInIconMode() ? 0.0001f : 0.0002f;
|
|
556 |
float h1 = isInIconMode() ? 0.0001f : 0.015f;
|
|
556 | 557 |
float h2 = 0.0001f; |
557 |
float[][] bands = { {h1,15,0.2f,0.4f,5,0,0}, {h2,15,0.05f,0.1f,2,0,0} };
|
|
558 |
float[][] bands = { {h1,25,0.2f,0.4f,5,0,0}, {h2,25,0.05f,0.1f,2,0,0} };
|
|
558 | 559 |
int num = 1+4*N; |
559 | 560 |
int[] indices = new int[num]; |
560 | 561 |
for(int i=1; i<num; i++) indices[i] = 1; |
... | ... | |
564 | 565 |
{ |
565 | 566 |
float h1 = isInIconMode() ? 0.0001f : 0.015f; |
566 | 567 |
float h2 = isInIconMode() ? 0.0001f : 0.001f; |
567 |
float[][] bands = { {h1,15,0.250f,0.7f,5,0,0}, {h2,15,0.125f,0.2f,2,0,0} };
|
|
568 |
float[][] bands = { {h1,25,0.250f,0.7f,5,0,0}, {h2,25,0.125f,0.2f,2,0,0} };
|
|
568 | 569 |
int num = 1+2*N; |
569 | 570 |
int[] indices = new int[num]; |
570 | 571 |
for(int i=1; i<num; i++) indices[i] = 1; |
Also available in: Unified diff
correct face shapes (post-new MeshPolygon normal computation)