From bb11c498b7d4fe269e7273a1b164e46f3c7a3b50 Mon Sep 17 00:00:00 2001 From: Sven Göthel Date: Tue, 9 Jan 2024 03:13:20 +0100 Subject: Graph Clipping: Initial Region impl of AABBox clipping using GLSL shader (Convenient using Graph/GraphUI produced AABBox) Simple demo, setting clip-bbox manually: - src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeClippingDemo00.java TODO: - GLSL: Add missing Mv-multiplication of vertex-position -> gcv_ClipBBoxCoord -- AABBox min/max should be set pre-multiplied w/ Mv covering an independent area, not per Shape/Region. -- This to properly work with moving/scaling of each Shape/Region etc --- src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java') diff --git a/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java b/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java index fd564c800..ae2af3960 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java +++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java @@ -108,6 +108,9 @@ public class Rectangle extends GraphShape { this( renderModes, 0, 0, width, height, lineWidth, 0); } + public final float getX() { return minX; } + public final float getY() { return minY; } + public final float getZ() { return zPos; } public final float getWidth() { return width; } public final float getHeight() { return height; } public final float getLineWidth() { return lineWidth; } -- cgit v1.2.3