Revision 33a6303d
Added by Leszek Koltunski about 1 year ago
src/main/java/org/distorted/objectlib/objects/TwistyIcosamate.java | ||
---|---|---|
233 | 233 |
int i0 = edgeIndices[0]; |
234 | 234 |
int i1 = edgeIndices[1]; |
235 | 235 |
|
236 |
float x = (VEC[i0][0]+VEC[i1][0])/2; |
|
237 |
float y = (VEC[i0][1]+VEC[i1][1])/2; |
|
238 |
float z = (VEC[i0][2]+VEC[i1][2])/2; |
|
236 |
float x = N*(VEC[i0][0]+VEC[i1][0])/2;
|
|
237 |
float y = N*(VEC[i0][1]+VEC[i1][1])/2;
|
|
238 |
float z = N*(VEC[i0][2]+VEC[i1][2])/2;
|
|
239 | 239 |
|
240 | 240 |
return new float[] { x,y,z }; |
241 | 241 |
} |
... | ... | |
407 | 407 |
|
408 | 408 |
public ObjectFaceShape getObjectFaceShape(int variant) |
409 | 409 |
{ |
410 |
float N = getNumLayers()[0]; |
|
411 |
|
|
410 | 412 |
if( variant==0 ) |
411 | 413 |
{ |
414 |
int N1 = N==2 ? 5:4; |
|
415 |
int N2 = N==2 ? 3:2; |
|
412 | 416 |
float h1 = isInIconMode() ? 0.001f : 0.04f; |
413 | 417 |
float h2 = 0.001f; |
414 |
float[][] bands = { {h1,27,0.2f,0.4f,5,0,0}, {h2,27,0.2f,0.4f,3,0,0} };
|
|
418 |
float[][] bands = { {h1,27,0.2f,0.4f,N1,0,0}, {h2,27,0.2f,0.4f,N2,0,0} };
|
|
415 | 419 |
int[] indices = { 0,0,0,0,0, 1,1,1,1,1,1 }; |
416 | 420 |
return new ObjectFaceShape(bands,indices,null); |
417 | 421 |
} |
418 | 422 |
else if( variant==1 ) |
419 | 423 |
{ |
424 |
int N1 = N==2 ? 5:4; |
|
425 |
int N2 = N==2 ? 3:2; |
|
420 | 426 |
float h1 = isInIconMode() ? 0.001f : 0.04f; |
421 | 427 |
float h2 = 0.001f; |
422 |
float[][] bands = { {h1,25,0.2f,0.4f,5,0,0}, {h2,25,0.2f,0.4f,3,0,0} };
|
|
428 |
float[][] bands = { {h1,25,0.2f,0.4f,N1,0,0}, {h2,25,0.2f,0.4f,N2,0,0} };
|
|
423 | 429 |
int[] indices = { 0,1,1,1 }; |
424 | 430 |
return new ObjectFaceShape(bands,indices,null); |
425 | 431 |
} |
426 | 432 |
else |
427 | 433 |
{ |
434 |
int N1 = N==2 ? 5:4; |
|
435 |
int N2 = N==2 ? 3:2; |
|
428 | 436 |
float h1 = isInIconMode() ? 0.001f : 0.04f; |
429 | 437 |
float h2 = 0.001f; |
430 |
float[][] bands = { {h1,25,0.2f,0.4f,5,0,0}, {h2,25,0.2f,0.4f,3,0,0} };
|
|
438 |
float[][] bands = { {h1,25,0.2f,0.4f,N1,0,0}, {h2,25,0.2f,0.4f,N2,0,0} };
|
|
431 | 439 |
int[] indices = { 0,0,1,1,1,1 }; |
432 | 440 |
return new ObjectFaceShape(bands,indices,null); |
433 | 441 |
} |
Also available in: Unified diff
Master Icosamate: fully works now.