diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index dcfff9d2c..e09b49eae 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -281,10 +281,10 @@ public abstract class PGraphics extends PImage implements PConstants { // [toxi 031031] // changed table's precision to 0.5 degree steps // introduced new vars for more flexible code - static final float sinLUT[]; - static final float cosLUT[]; - static final float SINCOS_PRECISION = 0.5f; - static final int SINCOS_LENGTH = (int) (360f / SINCOS_PRECISION); + static final protected float sinLUT[]; + static final protected float cosLUT[]; + static final protected float SINCOS_PRECISION = 0.5f; + static final protected int SINCOS_LENGTH = (int) (360f / SINCOS_PRECISION); static { sinLUT = new float[SINCOS_LENGTH]; cosLUT = new float[SINCOS_LENGTH]; @@ -1108,10 +1108,10 @@ public abstract class PGraphics extends PImage implements PConstants { /** This feature is in testing, do not use or rely upon its implementation */ - public void breakShape() { + public void breakShape() { } - - + + public final void endShape() { endShape(OPEN); } diff --git a/core/src/processing/core/PGraphics3D.java b/core/src/processing/core/PGraphics3D.java index a1c71f829..e8e0abde7 100644 --- a/core/src/processing/core/PGraphics3D.java +++ b/core/src/processing/core/PGraphics3D.java @@ -565,15 +565,20 @@ public class PGraphics3D extends PGraphics { } float vertex[] = vertices[vertexCount]; - //if (polygon.redundantVertex(x, y, z)) return; - if (vertexCount > 0) { - float pvertex[] = vertices[vertexCount-1]; - if ((abs(pvertex[MX] - x) < EPSILON) && - (abs(pvertex[MY] - y) < EPSILON) && - (abs(pvertex[MZ] - z) < EPSILON)) { - // this vertex is identical, don't add it, - // because it will anger the triangulator - return; + // only do this if we're using an irregular (POLYGON) shape that + // will go through the triangulator. otherwise it'll do thinks like + // disappear in mathematically odd ways + // http://dev.processing.org/bugs/show_bug.cgi?id=444 + if (shape == POLYGON) { + if (vertexCount > 0) { + float pvertex[] = vertices[vertexCount-1]; + if ((abs(pvertex[MX] - x) < EPSILON) && + (abs(pvertex[MY] - y) < EPSILON) && + (abs(pvertex[MZ] - z) < EPSILON)) { + // this vertex is identical, don't add it, + // because it will anger the triangulator + return; + } } } diff --git a/core/todo.txt b/core/todo.txt index 17413ca23..14bb197f7 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -6,6 +6,9 @@ X lerpColor(c1, c2, amt, RGB/HSB/???) _ test this out for a bit _ though that's awkward b/c colors always RGB _ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Suggestions;action=display;num=1160096087 +X regression in P3D that prevents point() from drawing +X problem is with setup_vertex() not adding similar points +X http://dev.processing.org/bugs/show_bug.cgi?id=444 fixed earlier, bug cleaning X gray background in pdf (using both gl and p3d)