Revision f804fce3
Added by Leszek Koltunski over 1 year ago
src/main/java/org/distorted/examples/meshfile/MeshFileRenderer.java | ||
---|---|---|
60 | 60 |
import static org.distorted.examples.meshfile.MeshFileActivity.POLYGON; |
61 | 61 |
import static org.distorted.examples.meshfile.MeshFileActivity.PROCEDURAL; |
62 | 62 |
import static org.distorted.objectlib.main.TwistyObject.MESH_NICE; |
63 |
import static org.distorted.objectlib.main.TwistyObject.MODE_NORM; |
|
64 | 63 |
|
65 | 64 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
66 | 65 |
|
... | ... | |
276 | 275 |
float A = 0.5f; |
277 | 276 |
float B = 0.04f; |
278 | 277 |
|
279 |
int extraIndex = 1;
|
|
280 |
int extraVertices = 1;
|
|
278 |
int extraIndex = 0;
|
|
279 |
int extraVertices = 0;
|
|
281 | 280 |
float[] vertices = new float[] { -A,-A, A,-A, A,A, -A,A }; |
282 | 281 |
|
283 | 282 |
float C = 2f; |
... | ... | |
294 | 293 |
} |
295 | 294 |
*/ |
296 | 295 |
boolean[] edgesUp = new boolean[] {true,true,false,false}; |
297 |
boolean[] vertsUp = new boolean[] {true,true,false,false};
|
|
296 |
boolean[] vertsUp = new boolean[] {false,false,false,false};
|
|
298 | 297 |
|
299 | 298 |
mMesh = new MeshPolygon(vertices,bands,edgesUp,vertsUp,extraIndex,extraVertices,0.0f,0.0f); |
300 | 299 |
mMesh.setEffectAssociation(0,0,0); |
301 |
// mMesh.setShowNormals(true);
|
|
300 |
mMesh.setShowNormals(true); |
|
302 | 301 |
} |
303 | 302 |
|
304 | 303 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
325 | 324 |
|
326 | 325 |
float[][] centers = new float[][] { c1,c2,c3,c4,c5 }; |
327 | 326 |
*/ |
328 |
float C = 0.5f;
|
|
327 |
float C = 1f;
|
|
329 | 328 |
float[] bands = new float[] { 1.0f, 0.00f*C, 0.9f, 0.04f*C, 0.8f, 0.07f*C, 0.5f, 0.09f*C, 0.0f, 0.10f*C}; |
330 | 329 |
|
331 | 330 |
/* |
Also available in: Unified diff
improve MeshPolygon. Now Multigon's meshes are close to perfect.