mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
Normal modes are AUTO/MANUAL now
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -1236,10 +1236,6 @@ public class PGraphicsAndroid3D extends PGraphics {
|
||||
}
|
||||
|
||||
shape = 0;
|
||||
|
||||
if (normalMode == SHAPE) {
|
||||
normalX = normalY = normalZ = 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected void endShapeStroke(int mode) {
|
||||
|
||||
Reference in New Issue
Block a user