From c65c750e032118f229050ff8e834961264ed0591 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 18 Apr 2023 05:15:16 +0200 Subject: 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() --- src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java') 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