summaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-02-14 09:32:53 +0100
committerSven Gothel <[email protected]>2023-02-14 09:32:53 +0100
commit53259c43474eb9bc1475365ed251344202c4c179 (patch)
treed881c844a5a9b5735eea3fe8c7efe0e560d9fa48 /src/test/com
parent6d2009d33495a01ae3b59a4be6004c1a5e7007ad (diff)
Graph OutlineShape: Path2F alike sub-path ctor: Add z coordinate for custom plane.
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java36
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/ui/CrossHair.java35
2 files changed, 35 insertions, 36 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java
index 7dc217c2d..b78826a6d 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java
@@ -99,30 +99,30 @@ public class GPURegionGLListener01 extends GPURendererListenerBase01 {
}
private void createTestOutline01(){
- outlineShape.moveTo(0.0f,-10.0f);
- outlineShape.lineTo(15.0f,-10.0f);
- outlineShape.quadTo(10.0f,5.0f, 15.0f,10.0f);
- outlineShape.cubicTo(6.0f,15.0f, 5.0f,8.0f, 0.0f,10.0f);
+ outlineShape.moveTo(0.0f,-10.0f, 0f);
+ outlineShape.lineTo(15.0f,-10.0f, 0f);
+ outlineShape.quadTo(10.0f,5.0f,0f, 15.0f,10.0f,0f);
+ outlineShape.cubicTo(6.0f,15.0f,0f, 5.0f,8.0f,0f, 0.0f,10.0f,0f);
outlineShape.closePath();
- outlineShape.moveTo(5.0f,-5.0f);
- outlineShape.quadTo(10.0f,-5.0f, 10.0f,0.0f);
- outlineShape.quadTo(5.0f,0.0f, 5.0f,-5.0f);
+ outlineShape.moveTo(5.0f,-5.0f,0f);
+ outlineShape.quadTo(10.0f,-5.0f,0f, 10.0f,0.0f,0f);
+ outlineShape.quadTo(5.0f,0.0f,0f, 5.0f,-5.0f,0f);
outlineShape.closePath();
/** Same shape as above but without any off-curve vertices */
final float offset = 30;
- outlineShape.moveTo(offset+0.0f,-10.0f);
- outlineShape.lineTo(offset+17.0f,-10.0f);
- outlineShape.lineTo(offset+11.0f,5.0f);
- outlineShape.lineTo(offset+16.0f,10.0f);
- outlineShape.lineTo(offset+7.0f,15.0f);
- outlineShape.lineTo(offset+6.0f,8.0f);
- outlineShape.lineTo(offset+0.0f,10.0f);
+ outlineShape.moveTo(offset+0.0f,-10.0f,0f);
+ outlineShape.lineTo(offset+17.0f,-10.0f,0f);
+ outlineShape.lineTo(offset+11.0f,5.0f,0f);
+ outlineShape.lineTo(offset+16.0f,10.0f,0f);
+ outlineShape.lineTo(offset+7.0f,15.0f,0f);
+ outlineShape.lineTo(offset+6.0f,8.0f,0f);
+ outlineShape.lineTo(offset+0.0f,10.0f,0f);
outlineShape.closePath();
- outlineShape.moveTo(offset+5.0f,0.0f);
- outlineShape.lineTo(offset+5.0f,-5.0f);
- outlineShape.lineTo(offset+10.0f,-5.0f);
- outlineShape.lineTo(offset+10.0f,0.0f);
+ outlineShape.moveTo(offset+5.0f,0.0f,0f);
+ outlineShape.lineTo(offset+5.0f,-5.0f,0f);
+ outlineShape.lineTo(offset+10.0f,-5.0f,0f);
+ outlineShape.lineTo(offset+10.0f,0.0f,0f);
outlineShape.closePath();
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/CrossHair.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/CrossHair.java
index a7c0bf84b..209ce3e57 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/CrossHair.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/CrossHair.java
@@ -77,24 +77,23 @@ public class CrossHair extends UIShape {
final float lwh = lineWidth/2f;
final float ctrX = 0f, ctrY = 0f;
- float ctrZ = 0f;
-
- // vertical (CCW!)
- shape.addVertex(ctrX-lwh, ctrY-thh, ctrZ, true);
- shape.addVertex(ctrX+lwh, ctrY-thh, ctrZ, true);
- shape.addVertex(ctrX+lwh, ctrY+thh, ctrZ, true);
- shape.addVertex(ctrX-lwh, ctrY+thh, ctrZ, true);
- shape.closeLastOutline(true);
-
- ctrZ -= 0.05f;
-
- // horizontal (CCW!)
- shape.addEmptyOutline();
- shape.addVertex(ctrX-twh, ctrY-lwh, ctrZ, true);
- shape.addVertex(ctrX+twh, ctrY-lwh, ctrZ, true);
- shape.addVertex(ctrX+twh, ctrY+lwh, ctrZ, true);
- shape.addVertex(ctrX-twh, ctrY+lwh, ctrZ, true);
- shape.closeLastOutline(true);
+ final float ctrZ = 0f;
+
+ // middle vertical (CCW!)
+ shape.moveTo(ctrX-lwh, ctrY-thh, ctrZ);
+ shape.lineTo(ctrX+lwh, ctrY-thh, ctrZ);
+ shape.lineTo(ctrX+lwh, ctrY+thh, ctrZ);
+ shape.lineTo(ctrX-lwh, ctrY+thh, ctrZ);
+ shape.closePath();
+
+ // ctrZ -= 0.05f;
+
+ // middle horizontal (CCW!)
+ shape.moveTo(ctrX-twh, ctrY-lwh, ctrZ);
+ shape.lineTo(ctrX+twh, ctrY-lwh, ctrZ);
+ shape.lineTo(ctrX+twh, ctrY+lwh, ctrZ);
+ shape.lineTo(ctrX-twh, ctrY+lwh, ctrZ);
+ shape.closePath();
shape.setIsQuadraticNurbs();
shape.setSharpness(shapesSharpness);