Normal modes are AUTO/MANUAL now

This commit is contained in:
codeanticode
2010-11-16 14:48:20 +00:00
parent e66a1fbc19
commit bb3cfdf78a
3 changed files with 1 additions and 22 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -1236,10 +1236,6 @@ public class PGraphicsAndroid3D extends PGraphics {
}
shape = 0;
if (normalMode == SHAPE) {
normalX = normalY = normalZ = 0;
}
}
protected void endShapeStroke(int mode) {