Revision fb90b370
Added by Leszek Koltunski about 3 years ago
src/main/java/org/distorted/examples/meshfile/MeshFileRenderer.java | ||
---|---|---|
44 | 44 |
import org.distorted.library.type.Static4D; |
45 | 45 |
|
46 | 46 |
import org.distorted.objectlib.helpers.FactoryCubit; |
47 |
import org.distorted.objectlib.helpers.ObjectShape; |
|
48 | 47 |
|
49 | 48 |
import java.io.DataInputStream; |
50 | 49 |
import java.io.IOException; |
... | ... | |
289 | 288 |
|
290 | 289 |
private void createMesh() |
291 | 290 |
{ |
292 |
int mode =18;
|
|
291 |
int mode =19;
|
|
293 | 292 |
int numComponents = 0; |
294 | 293 |
float[][] vertices = null; |
295 | 294 |
int[][] vertIndexes = null; |
... | ... | |
1352 | 1351 |
final float LEN = 1.5f; |
1353 | 1352 |
|
1354 | 1353 |
final float A = SQ2*CUT*LEN; |
1355 |
final float C = LEN-2*LEN*CUT;
|
|
1354 |
final float B = LEN-2*LEN*CUT;
|
|
1356 | 1355 |
|
1357 | 1356 |
vertices = new float[][] |
1358 | 1357 |
{ |
1359 |
{ -C, 0, 0},
|
|
1360 |
{ -C+A, A, -A},
|
|
1361 |
{ -C+A, -A, -A},
|
|
1362 |
{ C, 0, 0},
|
|
1363 |
{ C-A, A, -A},
|
|
1364 |
{ C-A, -A, -A},
|
|
1365 |
{ 0, A, -C},
|
|
1366 |
{ 0, -A, -C},
|
|
1358 |
{ -B, 0, 0},
|
|
1359 |
{ -B+A, SQ2*A, -A},
|
|
1360 |
{ -B+A,-SQ2*A, -A},
|
|
1361 |
{ B, 0, 0},
|
|
1362 |
{ B-A, SQ2*A, -A},
|
|
1363 |
{ B-A,-SQ2*A, -A},
|
|
1364 |
{ 0, SQ2*A, -B},
|
|
1365 |
{ 0,-SQ2*A, -B},
|
|
1367 | 1366 |
}; |
1368 | 1367 |
|
1369 | 1368 |
vertIndexes = new int[][] |
Also available in: Unified diff
Trajber's Octahedron: progress.