| 522 |
522 |
public ObjectFaceShape getObjectFaceShape(int variant)
|
| 523 |
523 |
{
|
| 524 |
524 |
float height = isInIconMode() ? 0.001f : 0.03f;
|
|
525 |
float internal = 0.02f;
|
| 525 |
526 |
int numL = getNumLayers()[0];
|
| 526 |
527 |
float DIST = numL==3 ? DIST3:DIST4;
|
| 527 |
528 |
|
| ... | ... | |
| 529 |
530 |
{
|
| 530 |
531 |
float push1 = numL<=3 ? 0.07f : 0.06f;
|
| 531 |
532 |
float push2 = numL<=3 ? 0.06f : 0.05f;
|
| 532 |
|
float[][] bands = { {height,30,0.15f,0.5f,5,1,2}, {0.001f,30,0.2f,0.4f,5,1,2} };
|
|
533 |
float[][] bands = { {height,30,0.15f,0.5f,5,1,2}, {internal,30,0.2f,0.4f,5,1,2} };
|
| 533 |
534 |
int[] bandIndices = { 0,0,0,1,1,1 };
|
| 534 |
535 |
float[][] corners = { {push1,0.025f}, {push2,0.020f} };
|
| 535 |
536 |
int[] indices = { 0,0,0,0,-1 };
|
| ... | ... | |
| 541 |
542 |
final float C = numL==2 ? 1.0f : numL*(3*DIST-1);
|
| 542 |
543 |
final float Y = (SQ2/2)*C;
|
| 543 |
544 |
final float Z = 0.5f*C;
|
| 544 |
|
float[][] bands = { {height,30,0.15f,0.5f,5,1,1}, {0.001f,30,0.25f,0.5f,5,1,1} };
|
|
545 |
float[][] bands = { {height,30,0.15f,0.5f,5,1,1}, {internal,30,0.25f,0.5f,5,1,1} };
|
| 545 |
546 |
int[] bandIndices = { 0,1,1,1 };
|
| 546 |
547 |
float[][] corners = { {0.08f,0.013f} };
|
| 547 |
|
int[] indices = { 0,0,0,-1 };
|
|
548 |
int[] indices = { -1,-1,-1,-1 };
|
| 548 |
549 |
float[][] centers = { { 0.0f,-Y/3,-2*Z/3 } };
|
| 549 |
550 |
return new ObjectFaceShape(bands,bandIndices,corners,indices,centers,indices,null);
|
| 550 |
551 |
}
|
| 551 |
552 |
else if( variant==2 )
|
| 552 |
553 |
{
|
| 553 |
|
float[][] bands = { {height,30,0.15f,0.5f,5,1,1}, {0.001f,30,0.25f,0.5f,5,1,1} };
|
|
554 |
float[][] bands = { {height,30,0.15f,0.5f,5,1,1}, {internal,30,0.25f,0.5f,5,1,1} };
|
| 554 |
555 |
int[] bandIndices = { 0,0,1,1,1,1,1 };
|
| 555 |
556 |
float[][] corners = { {0.07f,0.013f} };
|
| 556 |
557 |
int[] indices = { 0,0,-1,-1,-1,-1,-1,-1 };
|
| ... | ... | |
| 559 |
560 |
}
|
| 560 |
561 |
else if( variant==3 || variant==4 )
|
| 561 |
562 |
{
|
|
563 |
int c = variant==3 ? 0 : -1;
|
| 562 |
564 |
final float Y = (SQ2/4)*numL*(1-2*DIST)/(numL-2);
|
| 563 |
|
float[][] bands = { {height,30,0.15f,0.5f,5,0,0}, {0.001f,30,0.25f,0.5f,5,0,0} };
|
|
565 |
float[][] bands = { {height,30,0.15f,0.5f,5,0,0}, {internal,30,0.25f,0.5f,5,0,0} };
|
| 564 |
566 |
int[] bandIndices = { 0,1,1,1,1 };
|
| 565 |
567 |
float[][] corners = { {0.05f,0.023f} };
|
| 566 |
|
int[] indices = { 0,0,-1,0,0,-1, };
|
|
568 |
int[] indices = { -1,-1,-1,c,c,-1, };
|
| 567 |
569 |
float[][] centers = { { 0.0f,-Y,0.0f } };
|
| 568 |
570 |
return new ObjectFaceShape(bands,bandIndices,corners,indices,centers,indices,null);
|
| 569 |
571 |
}
|
| 570 |
572 |
else
|
| 571 |
573 |
{
|
| 572 |
574 |
final float Z = numL*(1-2*DIST)/(2*numL-4);
|
| 573 |
|
float[][] bands = { {height,30,0.15f,0.5f,5,0,0}, {0.001f,30,0.25f,0.5f,3,0,0} };
|
|
575 |
float[][] bands = { {height,30,0.15f,0.5f,5,0,0}, {internal,30,0.25f,0.5f,3,0,0} };
|
| 574 |
576 |
int[] bandIndices = { 0,1,1,1,1,1 };
|
| 575 |
577 |
float[][] corners = { {0.02f,0.023f} };
|
| 576 |
578 |
int[] indices = { 0,0,0,0,-1,-1,-1,-1 };
|
Corrections for Megamorphix.