Revision a4d6a520
Added by Leszek Koltunski almost 3 years ago
src/main/java/org/distorted/examples/meshfile/MeshFileRenderer.java | ||
---|---|---|
289 | 289 |
|
290 | 290 |
private void createMesh() |
291 | 291 |
{ |
292 |
int mode =22;
|
|
292 |
int mode =24;
|
|
293 | 293 |
int numComponents = 0; |
294 | 294 |
float[][] vertices = null; |
295 | 295 |
int[][] vertIndexes = null; |
... | ... | |
1503 | 1503 |
numComponents = 6; |
1504 | 1504 |
} |
1505 | 1505 |
|
1506 |
///// Pyramorphics corner /////////////////////////////////////////////////////////////// |
|
1507 |
|
|
1508 |
else if( mode==23 ) |
|
1509 |
{ |
|
1510 |
final float Y = SQ2/2; |
|
1511 |
final float Z = 1.0f; |
|
1512 |
|
|
1513 |
vertices = new float[][] |
|
1514 |
{ |
|
1515 |
{0.0f, 2*Y/3, 2*Z/3 }, |
|
1516 |
{0.0f, 2*Y/3, -Z/3 }, |
|
1517 |
{ Z/2, -Y/3, Z/6 }, |
|
1518 |
{-Z/2, -Y/3, Z/6 }, |
|
1519 |
{0.0f, -Y/3, -Z/3 } |
|
1520 |
}; |
|
1521 |
|
|
1522 |
vertIndexes = new int[][] { {3,2,0},{2,1,0},{1,3,0},{1,2,4},{3,1,4},{2,3,4} }; |
|
1523 |
bands = new float[][] { {0.03f,40,0.2f,0.4f,5,1,1}, {0.001f,40,0.2f,0.4f,5,1,1} }; |
|
1524 |
bandIndexes = new int[] { 0,0,0,1,1,1 }; |
|
1525 |
corners = new float[][] { {0.08f,0.13f} }; |
|
1526 |
cornerIndexes= new int[] { 0,0,0,0,-1 }; |
|
1527 |
centers = new float[][] { { 0.0f,0.0f,0.0f } }; |
|
1528 |
centerIndexes= new int[] { 0,0,0,0,-1 }; |
|
1529 |
} |
|
1530 |
|
|
1531 |
///// Pyramorphics face /////////////////////////////////////////////////////////////// |
|
1532 |
|
|
1533 |
else if( mode==24 ) |
|
1534 |
{ |
|
1535 |
final float X = 1.0f; |
|
1536 |
final float Y = SQ2/2; |
|
1537 |
final float Z = 0.5f; |
|
1538 |
|
|
1539 |
vertices = new float[][] |
|
1540 |
{ |
|
1541 |
{-X/2, Y/3, Z/3 }, |
|
1542 |
{ X/2, Y/3, Z/3 }, |
|
1543 |
{0.0f,-2*Y/3,-2*Z/3 }, |
|
1544 |
{0.0f, Y/3,-2*Z/3 } |
|
1545 |
}; |
|
1546 |
|
|
1547 |
vertIndexes = new int[][] { {0,2,1},{0,1,3},{2,3,1},{2,0,3} }; |
|
1548 |
bands = new float[][] { {0.03f,30,0.15f,0.5f,5,1,2}, {0.001f,30,0.25f,0.5f,5,1,2} }; |
|
1549 |
bandIndexes = new int[] { 0,1,1,1 }; |
|
1550 |
corners = new float[][] { {0.09f,0.13f} }; |
|
1551 |
cornerIndexes= new int[] { 0,0,0,-1 }; |
|
1552 |
centers = new float[][] { { 0.0f, Y/3,-2*Z/3 } }; |
|
1553 |
centerIndexes= new int[] { 0,0,0,-1 }; |
|
1554 |
} |
|
1555 |
|
|
1506 | 1556 |
///// END DEFINITIONS ///////////////////////////////////////////////////////////////// |
1507 | 1557 |
|
1508 | 1558 |
FactoryCubit factory = FactoryCubit.getInstance(); |
Also available in: Unified diff
Add Pyramorphix.