Revision 54e47d9b
Added by Leszek Koltunski about 3 years ago
src/main/java/org/distorted/examples/meshfile/MeshFileRenderer.java | ||
---|---|---|
54 | 54 |
import javax.microedition.khronos.opengles.GL10; |
55 | 55 |
|
56 | 56 |
import static org.distorted.examples.meshfile.MeshFileActivity.PROCEDURAL; |
57 |
import static org.distorted.examples.meshfile.FactoryCubit.COS18; |
|
58 |
import static org.distorted.examples.meshfile.FactoryCubit.SIN18; |
|
57 | 59 |
|
58 | 60 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
59 | 61 |
|
... | ... | |
328 | 330 |
|
329 | 331 |
private void createMesh() |
330 | 332 |
{ |
331 |
int[] dimensions = new int[] {1,1,3}; |
|
333 |
int type = 0; |
|
334 |
int numLayers = 3; |
|
335 |
float tmp = (numLayers/3.0f)/(numLayers-1); |
|
336 |
float height= tmp*COS18; |
|
337 |
float width = tmp + type*height*SIN18/COS18; |
|
332 | 338 |
|
333 | 339 |
FactoryCubit factory = FactoryCubit.getInstance(); |
334 |
mMesh = factory.createCuboidMesh(dimensions);
|
|
340 |
mMesh = factory.createKilominxEdgeMesh(numLayers, width, height, (type%2)==0 );
|
|
335 | 341 |
|
336 | 342 |
//mMesh = createStaticMesh(); |
337 | 343 |
|
Also available in: Unified diff
Progress with any size Kilominx.