From bb3cfdf78afb356b1a52ea63aa0a9ac275eedbe3 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Tue, 16 Nov 2010 14:48:20 +0000 Subject: [PATCH] Normal modes are AUTO/MANUAL now --- android/core/src/processing/core/PConstants.java | 10 +--------- android/core/src/processing/core/PGraphics.java | 9 --------- .../core/src/processing/core/PGraphicsAndroid3D.java | 4 ---- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/android/core/src/processing/core/PConstants.java b/android/core/src/processing/core/PConstants.java index 0a7366336..7a6270188 100644 --- a/android/core/src/processing/core/PConstants.java +++ b/android/core/src/processing/core/PConstants.java @@ -380,21 +380,13 @@ public interface PConstants { * In the vertex mode, the user should specify a normal for * each vertex. */ - static final int VERTEX = 6; + static final int MANUAL = 6; /** * Normal vectors are automatically calculated if not set. */ static final int AUTO = 7; - /** - * ... and, the constant SHAPE from text placement modes - * is used to set the SHAPE normal mode, where the same shape - * is used for all the vertices in a shape. This conflict in the - * name of constants should be solved (TODO). - */ - - // text alignment modes // are inherited from LEFT, CENTER, RIGHT diff --git a/android/core/src/processing/core/PGraphics.java b/android/core/src/processing/core/PGraphics.java index 2c2266f42..c8eca3d77 100644 --- a/android/core/src/processing/core/PGraphics.java +++ b/android/core/src/processing/core/PGraphics.java @@ -1073,15 +1073,6 @@ public class PGraphics extends PImage implements PConstants { vertex[NX] = normalX; vertex[NY] = normalY; vertex[NZ] = normalZ; - - if (normalMode == VERTEX || normalMode == AUTO) { - // The AUTO mode works as the VERTEX mode (it allows the user to specify - // per-vertex normals) but if there are triangles where some of the vertices - // have no normal, then it will calculate the normal for that triangle (in - // the renderTriangles() method of PGraphicsAndroid3D). - normalX = normalY = normalZ = 0; - } - verticesTexture[vertexCount] = textureImage; diff --git a/android/core/src/processing/core/PGraphicsAndroid3D.java b/android/core/src/processing/core/PGraphicsAndroid3D.java index 6458cdf7d..d5162c00b 100644 --- a/android/core/src/processing/core/PGraphicsAndroid3D.java +++ b/android/core/src/processing/core/PGraphicsAndroid3D.java @@ -1236,10 +1236,6 @@ public class PGraphicsAndroid3D extends PGraphics { } shape = 0; - - if (normalMode == SHAPE) { - normalX = normalY = normalZ = 0; - } } protected void endShapeStroke(int mode) {