From 5242c1392c39d3a4b0a95ebfdc72bcd93bf2f820 Mon Sep 17 00:00:00 2001 From: Sven Göthel Date: Fri, 2 Feb 2024 10:33:49 +0100 Subject: OutlineShape: Earmark coloring task when triangulating .. --- src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java index cda46d8f6..eb6548838 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java +++ b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java @@ -163,6 +163,10 @@ public final class OutlineShape implements Comparable { private final Vec3f tmpV1 = new Vec3f(); private final Vec3f tmpV2 = new Vec3f(); private final Vec3f tmpV3 = new Vec3f(); + // COLOR + // private final Vec4f tmpC1 = new Vec4f(); + // private final Vec4f tmpC2 = new Vec4f(); + // private final Vec4f tmpC3 = new Vec4f(); /** * Create a new Outline based Shape @@ -771,6 +775,11 @@ public final class OutlineShape implements Comparable { VectorUtil.midVec3(tmpV3, b.getCoord(), c.getCoord()); VectorUtil.midVec3(tmpV2, tmpV1, tmpV3); + // COLOR + // tmpC1.set(a.getColor()).add(b.getColor()).scale(0.5f); + // tmpC3.set(b.getColor()).add(b.getColor()).scale(0.5f); + // tmpC2.set(tmpC1).add(tmpC1).scale(0.5f); + //drop off-curve vertex to image on the curve b.setCoord(tmpV2); b.setOnCurve(true); @@ -917,6 +926,7 @@ public final class OutlineShape implements Comparable { VectorUtil.midVec3(tmpV1, currentVertex.getCoord(), nextVertex.getCoord()); System.err.println("XXX: Cubic: "+i+": "+currentVertex+", "+j+": "+nextVertex); final Vertex v = new Vertex(tmpV1, true); + // COLOR: tmpC1.set(currentVertex.getColor()).add(nextVertex.getColor()).scale(0.5f) i++; vertexCount++; addedVerticeCount++; -- cgit v1.2.3