Revision e018a923
Added by Leszek Koltunski almost 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; |
|
47 | 48 |
|
48 | 49 |
import java.io.DataInputStream; |
49 | 50 |
import java.io.IOException; |
... | ... | |
288 | 289 |
|
289 | 290 |
private void createMesh() |
290 | 291 |
{ |
291 |
int mode = 5;
|
|
292 |
int mode =17;
|
|
292 | 293 |
int numComponents = 0; |
293 | 294 |
float[][] vertices = null; |
294 | 295 |
int[][] vertIndexes = null; |
... | ... | |
1274 | 1275 |
numComponents = 6; |
1275 | 1276 |
} |
1276 | 1277 |
|
1278 |
///// REX PETAL /////////////////////////////////////////////////////////////// |
|
1279 |
|
|
1280 |
else if( mode==17 ) |
|
1281 |
{ |
|
1282 |
final float REX_D = 0.2f; |
|
1283 |
float G = (1-REX_D)*SQ2/2; |
|
1284 |
vertices = new float[][] {{-0.10f,0.70f,0},{-0.70f,0.10f,0},{+0.65f,-0.71f,0},{+0.71f,-0.65f,0},{0,0.05f,-0.2f} }; |
|
1285 |
vertIndexes = new int[][] { {0,1,2,3},{0,3,4},{3,2,4},{2,1,4},{1,0,4} }; |
|
1286 |
centers= new float[][] { {0.0f,0.0f,-G} }; |
|
1287 |
corners= new float[][] { {0.03f,0.30f} }; |
|
1288 |
cornerIndexes = new int[] {-1,-1,0,0,-1}; |
|
1289 |
centerIndexes = new int[] {-1,-1,0,0,-1}; |
|
1290 |
bandIndexes = new int[] { 0,1,1,1,1 }; |
|
1291 |
bands = new float[][] { {+0.016f,10,G/3,0.5f,5,1,1},{ +0.0f,45,0.1f,0.1f,2,0,0} }; |
|
1292 |
|
|
1293 |
numComponents = 5; |
|
1294 |
} |
|
1295 |
|
|
1277 | 1296 |
///// END DEFINITIONS ///////////////////////////////////////////////////////////////// |
1278 | 1297 |
|
1279 | 1298 |
FactoryCubit factory = FactoryCubit.getInstance(); |
Also available in: Unified diff
'Simple' and 'Nice' meshes: fix Rex.