diff options
author | Sven Gothel <[email protected]> | 2023-04-18 05:15:16 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-04-18 05:15:16 +0200 |
commit | c65c750e032118f229050ff8e834961264ed0591 (patch) | |
tree | 8500286ca6086eb21a9b275ccd586185090b1500 /src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java | |
parent | cd845589eea6c7773007e013bd5f2f37242cbe1a (diff) |
Graph + GraphUI: Consolidate Vertex: Drop SVertex and factory, use Vec[234]f instead of float[] and remove unused VectorUtil methods
After Matrix4f consolidation and proving same or better performance on non array types,
this enhances code readability, simplifies API, reduces bugs and may improve performance.
GraphUI:
- Have RoundButton as a functional class to make a round or rectangular backdrop,
i.e. impl. addShapeToRegion() via reused addRoundShapeToRegion()
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java')
-rw-r--r-- | src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java b/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java index 715b812c1..9772b860f 100644 --- a/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java +++ b/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java @@ -36,6 +36,7 @@ import com.jogamp.graph.geom.Outline; import com.jogamp.graph.geom.Triangle; import com.jogamp.graph.geom.Vertex; import com.jogamp.graph.geom.plane.Winding; +import com.jogamp.opengl.math.Vec2f; import com.jogamp.opengl.math.VectorUtil; import jogamp.opengl.Debug; @@ -145,13 +146,13 @@ public class CDTriangulator2D implements Triangulator { } } if( TEST_ENABLED ) { - final float[] tempV2 = new float[2]; + final Vec2f tempV2 = new Vec2f(); final CDTriangulator2DExpAddOn addOn = new CDTriangulator2DExpAddOn(); final int sinkSize = sink.size(); if( TEST_MARK_LINE ) { for(int i=0; i<sinkSize; i++) { final Triangle t0 = sink.get(i); - addOn.markLineInTriangle(t0, tempV2); + addOn.markLineInTriangle(t0); } } else if ( TEST_LINE_AA ){ for(int i=0; i<sinkSize-1; i+=2) { |