aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui/classes/com/jogamp/graph/ui/Container.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-09-20 19:51:55 +0200
committerSven Gothel <[email protected]>2023-09-20 19:51:55 +0200
commit5d6e8a367c03644740187e500c6de5d3ac039d5e (patch)
treea649f559413c51272ee3f4afff1f68ebfea45477 /src/graphui/classes/com/jogamp/graph/ui/Container.java
parentbbe845846ffc00807395a5070a7352c6bbe7e4ef (diff)
Bug 1452 - Decouple math functionality to 'com.jogamp.math' to be toolkit agnostic (PMVMatrix, Matrix4f, Vec4f, ..)
Math functionality (PMVMatrix, Matrix4f, Vec4f, ..) - shall be used toolkit agnostic, e.g. independent from OpenGL - shall be reused within our upcoming Vulkan implementation - may also move outside of JOGL, i.e. GlueGen or within its own package to be reused for other purposed. The 'com.jogamp.opengl.util.PMVMatrix' currently also used to feed in GLUniformData via the toolkit agnostic SyncAction and SyncBuffer shall also be split to a toolkit agnostic variant. An OpenGL PMVMatrix specialization implementing GLMatrixFunc can still exist, being derived from the toolkit agnostic base implementation. +++ Initial commit .. compile clean, passing most unit tests.
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui/Container.java')
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/Container.java23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/Container.java b/src/graphui/classes/com/jogamp/graph/ui/Container.java
index 845d41c0c..bc1e6d94f 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/Container.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/Container.java
@@ -32,10 +32,9 @@ import java.util.Comparator;
import java.util.List;
import com.jogamp.graph.ui.Shape.Visitor2;
+import com.jogamp.math.geom.AABBox;
+import com.jogamp.math.util.PMVMatrix4f;
import com.jogamp.graph.ui.Shape.Visitor1;
-import com.jogamp.opengl.fixedfunc.GLMatrixFunc;
-import com.jogamp.opengl.math.geom.AABBox;
-import com.jogamp.opengl.util.PMVMatrix;
/**
* Container interface of UI {@link Shape}s
@@ -71,9 +70,9 @@ public interface Container {
boolean contains(Shape s);
- AABBox getBounds(final PMVMatrix pmv, Shape shape);
+ AABBox getBounds(final PMVMatrix4f pmv, Shape shape);
- /** Enable or disable {@link PMVMatrix#getFrustum()} culling per {@link Shape}. Default is disabled. */
+ /** Enable or disable {@link PMVMatrix4f#getFrustum()} culling per {@link Shape}. Default is disabled. */
void setFrustumCullingEnabled(final boolean v);
/** Return whether {@link #setFrustumCullingEnabled(boolean) frustum culling} is enabled. */
@@ -86,7 +85,7 @@ public interface Container {
* @param action
* @return true to signal operation complete, i.e. {@code shape} found, otherwise false
*/
- boolean forOne(final PMVMatrix pmv, final Shape shape, final Runnable action);
+ boolean forOne(final PMVMatrix4f pmv, final Shape shape, final Runnable action);
/**
* Traverses through the graph and apply {@link Visitor1#visit(Shape)} for each, stop if it returns true.
@@ -96,21 +95,21 @@ public interface Container {
boolean forAll(Visitor1 v);
/**
- * Traverses through the graph and apply {@link Visitor2#visit(Shape, PMVMatrix)} for each, stop if it returns true.
+ * Traverses through the graph and apply {@link Visitor2#visit(Shape, PMVMatrix4f)} for each, stop if it returns true.
* @param pmv
* @param v
- * @return true to signal operation complete and to stop traversal, i.e. {@link Visitor2#visit(Shape, PMVMatrix)} returned true, otherwise false
+ * @return true to signal operation complete and to stop traversal, i.e. {@link Visitor2#visit(Shape, PMVMatrix4f)} returned true, otherwise false
*/
- boolean forAll(final PMVMatrix pmv, Visitor2 v);
+ boolean forAll(final PMVMatrix4f pmv, Visitor2 v);
/**
- * Traverses through the graph and apply {@link Visitor#visit(Shape, PMVMatrix)} for each, stop if it returns true.
+ * Traverses through the graph and apply {@link Visitor#visit(Shape, PMVMatrix4f)} for each, stop if it returns true.
*
* Each {@link Container} level is sorted using {@code sortComp}
* @param sortComp
* @param pmv
* @param v
- * @return true to signal operation complete and to stop traversal, i.e. {@link Visitor2#visit(Shape, PMVMatrix)} returned true, otherwise false
+ * @return true to signal operation complete and to stop traversal, i.e. {@link Visitor2#visit(Shape, PMVMatrix4f)} returned true, otherwise false
*/
- boolean forSortedAll(final Comparator<Shape> sortComp, final PMVMatrix pmv, final Visitor2 v);
+ boolean forSortedAll(final Comparator<Shape> sortComp, final PMVMatrix4f pmv, final Visitor2 v);
} \ No newline at end of file