diff options
author | Sven Gothel <[email protected]> | 2023-09-20 19:51:55 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-09-20 19:51:55 +0200 |
commit | 5d6e8a367c03644740187e500c6de5d3ac039d5e (patch) | |
tree | a649f559413c51272ee3f4afff1f68ebfea45477 /src/test/com/jogamp | |
parent | bbe845846ffc00807395a5070a7352c6bbe7e4ef (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/test/com/jogamp')
52 files changed, 280 insertions, 296 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/FontViewListener01.java b/src/test/com/jogamp/opengl/test/junit/graph/FontViewListener01.java index 684e0c78a..dcbb0b123 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/FontViewListener01.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/FontViewListener01.java @@ -37,12 +37,12 @@ import com.jogamp.graph.ui.layout.Gap; import com.jogamp.graph.ui.layout.GridLayout; import com.jogamp.graph.ui.shapes.GlyphShape; import com.jogamp.graph.ui.shapes.Rectangle; +import com.jogamp.math.geom.AABBox; import com.jogamp.newt.opengl.GLWindow; import com.jogamp.opengl.GL; import com.jogamp.opengl.GL2ES2; import com.jogamp.opengl.GLAutoDrawable; import com.jogamp.opengl.GLEventListener; -import com.jogamp.opengl.math.geom.AABBox; /** * Glyph Grid using GraphUI diff --git a/src/test/com/jogamp/opengl/test/junit/graph/GPURegionGLListener01.java b/src/test/com/jogamp/opengl/test/junit/graph/GPURegionGLListener01.java index 42ee9d2c0..1146d7a5f 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/GPURegionGLListener01.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/GPURegionGLListener01.java @@ -31,15 +31,14 @@ package com.jogamp.opengl.test.junit.graph; import com.jogamp.opengl.GL; import com.jogamp.opengl.GL2ES2; import com.jogamp.opengl.GLAutoDrawable; -import com.jogamp.opengl.fixedfunc.GLMatrixFunc; -import com.jogamp.opengl.math.Vec4f; import com.jogamp.graph.curve.OutlineShape; import com.jogamp.graph.curve.opengl.GLRegion; import com.jogamp.graph.curve.opengl.RenderState; -import com.jogamp.graph.geom.plane.Path2F; -import com.jogamp.graph.geom.plane.WindingRule; +import com.jogamp.math.Vec4f; +import com.jogamp.math.geom.plane.Path2F; +import com.jogamp.math.geom.plane.WindingRule; +import com.jogamp.math.util.PMVMatrix4f; import com.jogamp.graph.curve.opengl.RegionRenderer; -import com.jogamp.opengl.util.PMVMatrix; /** Demonstrate the rendering of multiple outlines into one region/OutlineShape * These Outlines are not necessary connected or contained. @@ -282,11 +281,10 @@ public class GPURegionGLListener01 extends GPURendererListenerBase01 { gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); final RegionRenderer regionRenderer = getRenderer(); - final PMVMatrix pmv = regionRenderer.getMatrix(); - pmv.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); - pmv.glLoadIdentity(); - pmv.glTranslatef(getXTran(), getYTran(), getZTran()); - pmv.glRotatef(getAngle(), 0, 1, 0); + final PMVMatrix4f pmv = regionRenderer.getMatrix(); + pmv.loadMvIdentity(); + pmv.translateMv(getXTran(), getYTran(), getZTran()); + pmv.rotateMv(getAngleRad(), 0, 1, 0); if( weight != regionRenderer.getWeight() ) { regionRenderer.setWeight(weight); } diff --git a/src/test/com/jogamp/opengl/test/junit/graph/GPURegionGLListener10.java b/src/test/com/jogamp/opengl/test/junit/graph/GPURegionGLListener10.java index 716c9f2e7..78d17624c 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/GPURegionGLListener10.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/GPURegionGLListener10.java @@ -35,14 +35,13 @@ import com.jogamp.opengl.GL; import com.jogamp.opengl.GL2ES2; import com.jogamp.opengl.GLAutoDrawable; import com.jogamp.opengl.GLProfile; -import com.jogamp.opengl.fixedfunc.GLMatrixFunc; import com.jogamp.graph.curve.OutlineShape; import com.jogamp.graph.curve.Region; import com.jogamp.graph.curve.opengl.GLRegion; import com.jogamp.graph.curve.opengl.RenderState; +import com.jogamp.math.util.PMVMatrix4f; import com.jogamp.graph.curve.opengl.RegionRenderer; -import com.jogamp.opengl.util.PMVMatrix; /** Demonstrate the rendering of multiple OutlineShapes * into one region @@ -123,11 +122,10 @@ public class GPURegionGLListener10 extends GPURendererListenerBase01 { final RegionRenderer regionRenderer = getRenderer(); - final PMVMatrix pmv = regionRenderer.getMatrix(); - pmv.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); - pmv.glLoadIdentity(); - pmv.glTranslatef(getXTran(), getYTran(), getZTran()); - pmv.glRotatef(getAngle(), 0, 1, 0); + final PMVMatrix4f pmv = regionRenderer.getMatrix(); + pmv.loadMvIdentity(); + pmv.translateMv(getXTran(), getYTran(), getZTran()); + pmv.rotateMv(getAngleRad(), 0, 1, 0); if( weight != regionRenderer.getWeight() ) { regionRenderer.setWeight(weight); } diff --git a/src/test/com/jogamp/opengl/test/junit/graph/GPURendererListenerBase01.java b/src/test/com/jogamp/opengl/test/junit/graph/GPURendererListenerBase01.java index 7d14dcf17..2eac05555 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/GPURendererListenerBase01.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/GPURendererListenerBase01.java @@ -39,23 +39,22 @@ import com.jogamp.opengl.GLEventListener; import com.jogamp.opengl.GLException; import com.jogamp.opengl.GLPipelineFactory; import com.jogamp.opengl.GLRunnable; -import com.jogamp.opengl.fixedfunc.GLMatrixFunc; import com.jogamp.graph.curve.Region; import com.jogamp.graph.curve.opengl.GLRegion; import com.jogamp.graph.curve.opengl.RegionRenderer; import com.jogamp.graph.curve.opengl.RenderState; import com.jogamp.graph.font.FontScale; +import com.jogamp.math.FloatUtil; +import com.jogamp.math.Recti; +import com.jogamp.math.Vec3f; +import com.jogamp.math.geom.AABBox; +import com.jogamp.math.util.PMVMatrix4f; import com.jogamp.newt.Window; import com.jogamp.newt.event.KeyEvent; import com.jogamp.newt.event.KeyListener; import com.jogamp.newt.opengl.GLWindow; -import com.jogamp.opengl.math.FloatUtil; -import com.jogamp.opengl.math.Recti; -import com.jogamp.opengl.math.Vec3f; -import com.jogamp.opengl.math.geom.AABBox; import com.jogamp.opengl.util.GLReadBufferUtil; -import com.jogamp.opengl.util.PMVMatrix; /** * @@ -110,7 +109,8 @@ public abstract class GPURendererListenerBase01 implements GLEventListener { public final float getZTran() { return zTran; } public final float getXTran() { return xTran; } public final float getYTran() { return yTran; } - public final float getAngle() { return ang; } + public final float getAngleDeg() { return ang; } + public final float getAngleRad() { return FloatUtil.adegToRad(ang); } public final int[] getSampleCount() { return sampleCount; } public final float[] getPosition() { return position; } @@ -149,20 +149,19 @@ public abstract class GPURendererListenerBase01 implements GLEventListener { getRenderer().init(gl); } - public static void mapWin2ObjectCoords(final PMVMatrix pmv, final Recti view, + public static void mapWin2ObjectCoords(final PMVMatrix4f pmv, final Recti view, final float zNear, final float zFar, final float orthoX, final float orthoY, final float orthoDist, final float[] winZ, final Vec3f objPos) { winZ[0] = (1f/zNear-1f/orthoDist)/(1f/zNear-1f/zFar); - pmv.gluUnProject(orthoX, orthoY, winZ[0], view, objPos); + pmv.mapWinToObj(orthoX, orthoY, winZ[0], view, objPos); } @Override public void reshape(final GLAutoDrawable drawable, final int xstart, final int ystart, final int width, final int height) { - final PMVMatrix pmv = renderer.getMatrix(); + final PMVMatrix4f pmv = renderer.getMatrix(); renderer.reshapePerspective(FloatUtil.QUARTER_PI, width, height, zNear, zFar); - pmv.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); - pmv.glLoadIdentity(); + pmv.loadMvIdentity(); System.err.printf("Reshape: zNear %f, zFar %f%n", zNear, zFar); System.err.printf("Reshape: Frustum: %s%n", pmv.getFrustum()); { diff --git a/src/test/com/jogamp/opengl/test/junit/graph/GPUTextRendererListenerBase01.java b/src/test/com/jogamp/opengl/test/junit/graph/GPUTextRendererListenerBase01.java index b6391b1cf..32db14340 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/GPUTextRendererListenerBase01.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/GPUTextRendererListenerBase01.java @@ -35,7 +35,6 @@ import com.jogamp.opengl.GLAnimatorControl; import com.jogamp.opengl.GLAutoDrawable; import com.jogamp.opengl.GLException; import com.jogamp.opengl.GLProfile; -import com.jogamp.opengl.fixedfunc.GLMatrixFunc; import com.jogamp.common.util.InterruptSource; import com.jogamp.graph.curve.Region; import com.jogamp.graph.curve.opengl.GLRegion; @@ -46,13 +45,13 @@ import com.jogamp.graph.font.Font; import com.jogamp.graph.font.FontFactory; import com.jogamp.graph.font.FontScale; import com.jogamp.graph.font.FontSet; -import com.jogamp.graph.geom.plane.AffineTransform; +import com.jogamp.math.geom.AABBox; +import com.jogamp.math.geom.plane.AffineTransform; +import com.jogamp.math.util.PMVMatrix4f; import com.jogamp.newt.Window; import com.jogamp.newt.event.KeyEvent; import com.jogamp.newt.event.KeyListener; import com.jogamp.newt.opengl.GLWindow; -import com.jogamp.opengl.math.geom.AABBox; -import com.jogamp.opengl.util.PMVMatrix; /** * @@ -301,9 +300,8 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB // final int[] view = new int[] { 0, 0, drawable.getWidth(), drawable.getHeight() }; final RegionRenderer renderer = getRenderer(); - final PMVMatrix pmv = renderer.getMatrix(); - pmv.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); - pmv.glLoadIdentity(); + final PMVMatrix4f pmv = renderer.getMatrix(); + pmv.loadMvIdentity(); renderer.setColorStatic(0.1f, 0.1f, 0.1f, 1.0f); final float pixelSizeFName = FontScale.toPixels(fontSizeFName, dpiV); final float pixelSizeHead = FontScale.toPixels(fontSizeHead, dpiV); @@ -314,7 +312,7 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB renderer.enable(gl, true); if( drawFPS ) { - pmv.glPushMatrix(); + pmv.pushMv(); final float pixelSizeFPS = FontScale.toPixels(fontSizeFPS, dpiV); final float lfps, tfps; final GLAnimatorControl animator = drawable.getAnimator(); @@ -335,58 +333,58 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB drawable.getChosenGLCapabilities().getAlphaBits()); // bottom, half line up - pmv.glTranslatef(nearPlaneX0, nearPlaneY0+(nearPlaneS * pixelSizeFPS / 2f), nearPlaneZ0); + pmv.translateMv(nearPlaneX0, nearPlaneY0+(nearPlaneS * pixelSizeFPS / 2f), nearPlaneZ0); { final float sxy = nearPlaneS * pixelSizeFPS; - pmv.glScalef(sxy, sxy, 1.0f); + pmv.scaleMv(sxy, sxy, 1.0f); } // No cache, keep region alive! TextRegionUtil.drawString3D(gl, regionFPS.clear(gl), renderer, font, text, null, sampleCountFPS, tempT1, tempT2); - pmv.glPopMatrix(); + pmv.popMv(); } // float dx = width - ( fontNameBox.getWidth() + font.getAdvanceWidth( Glyph.ID_SPACE ) ) * pixelSizeFName; float dx = width - ( fontNameBox.getWidth() + 2 * font.getAdvanceWidth( font.getGlyphID('X') ) ) * pixelSizeFName; float dy = height - fontNameBox.getHeight() * pixelSizeFName; { - pmv.glPushMatrix(); - pmv.glTranslatef(nearPlaneX0+(dx*nearPlaneSx), nearPlaneY0+(dy*nearPlaneSy), nearPlaneZ0); + pmv.pushMv(); + pmv.translateMv(nearPlaneX0+(dx*nearPlaneSx), nearPlaneY0+(dy*nearPlaneSy), nearPlaneZ0); { final float sxy = nearPlaneS * pixelSizeFName; - pmv.glScalef(sxy, sxy, 1.0f); + pmv.scaleMv(sxy, sxy, 1.0f); } // System.err.printf("FontN: [%f %f] -> [%f %f]%n", dx, dy, nearPlaneX0+(dx*nearPlaneSx), nearPlaneY0+(dy*nearPlaneSy)); textRegionUtil.drawString3D(gl, renderer, font, fontName, null, getSampleCount()); - pmv.glPopMatrix(); + pmv.popMv(); } dx = 10f; dy += -fontNameBox.getHeight() * pixelSizeFName - 10f; if(null != headtext) { - pmv.glPushMatrix(); + pmv.pushMv(); // System.err.printf("Head: [%f %f] -> [%f %f]%n", dx, dy, nearPlaneX0+(dx*nearPlaneSx), nearPlaneY0+(dy*nearPlaneSy)); - pmv.glTranslatef(nearPlaneX0+(dx*nearPlaneSx), nearPlaneY0+(dy*nearPlaneSy), nearPlaneZ0); + pmv.translateMv(nearPlaneX0+(dx*nearPlaneSx), nearPlaneY0+(dy*nearPlaneSy), nearPlaneZ0); { final float sxy = nearPlaneS * pixelSizeHead; - pmv.glScalef(sxy, sxy, 1.0f); + pmv.scaleMv(sxy, sxy, 1.0f); } // pmv.glTranslatef(x0, y1, z0); textRegionUtil.drawString3D(gl, renderer, font, headtext, null, getSampleCount()); - pmv.glPopMatrix(); + pmv.popMv(); } dy += ( -headbox.getHeight() - font.getLineHeight() ) * pixelSizeCenter; { - pmv.glPushMatrix(); - pmv.glTranslatef(nearPlaneX0+(dx*nearPlaneSx), nearPlaneY0+(dy*nearPlaneSy), nearPlaneZ0); + pmv.pushMv(); + pmv.translateMv(nearPlaneX0+(dx*nearPlaneSx), nearPlaneY0+(dy*nearPlaneSy), nearPlaneZ0); // System.err.printf("Bottom: [%f %f] -> [%f %f]%n", dx, dy, nearPlaneX0+(dx*nearPlaneSx), nearPlaneY0+(dy*nearPlaneSy)); - pmv.glTranslatef(getXTran(), getYTran(), getZTran()); - pmv.glRotatef(getAngle(), 0, 1, 0); + pmv.translateMv(getXTran(), getYTran(), getZTran()); + pmv.rotateMv(getAngleRad(), 0, 1, 0); { final float sxy = nearPlaneS * pixelSizeCenter; - pmv.glScalef(sxy, sxy, 1.0f); + pmv.scaleMv(sxy, sxy, 1.0f); } renderer.setColorStatic(0.9f, 0.0f, 0.0f, 1.0f); @@ -406,7 +404,7 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB textRegionUtil.drawString3D(gl, renderer, font, userString.toString(), null, getSampleCount()); } } - pmv.glPopMatrix(); + pmv.popMv(); } renderer.enable(gl, false); } @@ -487,7 +485,7 @@ public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerB public boolean isUserInputMode() { return userInput; } void dumpMatrix(final boolean bbox) { - System.err.println("Matrix: " + getXTran() + "/" + getYTran() + " x"+getZTran() + " @"+getAngle() +" fontSize "+fontSizeCenter); + System.err.println("Matrix: " + getXTran() + "/" + getYTran() + " x"+getZTran() + " @"+getAngleDeg() +" fontSize "+fontSizeCenter); if(bbox) { System.err.println("bbox em: "+font.getMetricBounds(text2)); System.err.println("bbox px: "+font.getMetricBounds(text2).scale(nearPlaneS * FontScale.toPixels(fontSizeCenter, dpiV))); diff --git a/src/test/com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java b/src/test/com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java index 9b487a2f0..b5fe23920 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java @@ -42,7 +42,6 @@ import com.jogamp.opengl.GLDrawable; import com.jogamp.opengl.GLException; import com.jogamp.opengl.GLProfile; import com.jogamp.opengl.JoglVersion; -import com.jogamp.opengl.fixedfunc.GLMatrixFunc; import com.jogamp.common.os.Clock; import com.jogamp.common.util.IOUtil; @@ -54,13 +53,13 @@ import com.jogamp.graph.curve.opengl.RegionRenderer; import com.jogamp.graph.curve.opengl.TextRegionUtil; import com.jogamp.graph.font.Font; import com.jogamp.graph.font.FontFactory; -import com.jogamp.graph.geom.plane.AffineTransform; -import com.jogamp.opengl.math.Vec4f; -import com.jogamp.opengl.math.geom.AABBox; +import com.jogamp.math.Vec4f; +import com.jogamp.math.geom.AABBox; +import com.jogamp.math.geom.plane.AffineTransform; +import com.jogamp.math.util.PMVMatrix4f; import com.jogamp.opengl.test.junit.util.MiscUtils; import com.jogamp.opengl.test.junit.util.NEWTGLContext; import com.jogamp.opengl.util.GLReadBufferUtil; -import com.jogamp.opengl.util.PMVMatrix; /** @@ -305,11 +304,10 @@ public class PerfTextRendererNEWT00 { final float dx = 0; final float dy = drawable.getSurfaceHeight() - 2 * fontScale * font.getLineHeight(); - final PMVMatrix pmv = renderer.getMatrix(); - pmv.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); - pmv.glLoadIdentity(); - pmv.glTranslatef(dx, dy, z0); - pmv.glScalef(fontScale, fontScale, 1f); + final PMVMatrix4f pmv = renderer.getMatrix(); + pmv.loadMvIdentity(); + pmv.translateMv(dx, dy, z0); + pmv.scaleMv(fontScale, fontScale, 1f); region.draw(gl, renderer, sampleCountIO); final long t5 = Clock.currentNanos(); // text added to region if( null != perf ) { diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestFontScale01NOUI.java b/src/test/com/jogamp/opengl/test/junit/graph/TestFontScale01NOUI.java index ad6355d8a..4500aae36 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/TestFontScale01NOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/TestFontScale01NOUI.java @@ -29,8 +29,7 @@ package com.jogamp.opengl.test.junit.graph; import com.jogamp.graph.font.FontScale; import com.jogamp.junit.util.JunitTracer; - -import com.jogamp.opengl.math.FloatUtil; +import com.jogamp.math.FloatUtil; import org.junit.Assert; import org.junit.Test; diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestFontsNEWT00.java b/src/test/com/jogamp/opengl/test/junit/graph/TestFontsNEWT00.java index afdecfaca..6516b2b1b 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/TestFontsNEWT00.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/TestFontsNEWT00.java @@ -36,8 +36,8 @@ import org.junit.runners.MethodSorters; import com.jogamp.graph.font.Font; import com.jogamp.graph.font.FontScale; -import com.jogamp.opengl.math.FloatUtil; -import com.jogamp.opengl.math.geom.AABBox; +import com.jogamp.math.FloatUtil; +import com.jogamp.math.geom.AABBox; import com.jogamp.opengl.test.junit.util.UITestCase; diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java index 80bb95d05..bf99aedee 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java @@ -37,7 +37,6 @@ import com.jogamp.opengl.GLCapabilities; import com.jogamp.opengl.GLDrawable; import com.jogamp.opengl.GLException; import com.jogamp.opengl.GLProfile; -import com.jogamp.opengl.fixedfunc.GLMatrixFunc; import org.junit.Assert; import org.junit.BeforeClass; @@ -54,12 +53,12 @@ import com.jogamp.graph.font.Font; import com.jogamp.graph.font.FontFactory; import com.jogamp.graph.font.FontScale; import com.jogamp.graph.font.FontSet; -import com.jogamp.opengl.math.geom.AABBox; +import com.jogamp.math.geom.AABBox; +import com.jogamp.math.util.PMVMatrix4f; import com.jogamp.opengl.test.junit.util.MiscUtils; import com.jogamp.opengl.test.junit.util.NEWTGLContext; import com.jogamp.opengl.test.junit.util.UITestCase; import com.jogamp.opengl.util.GLReadBufferUtil; -import com.jogamp.opengl.util.PMVMatrix; /** @@ -253,11 +252,10 @@ public class TestTextRendererNEWT01 extends UITestCase { dx += fontSize * font.getAdvanceWidth('X') * column; dy -= fontSize * textBox.getHeight() * ( row + 1 ); - final PMVMatrix pmv = renderer.getMatrix(); - pmv.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); - pmv.glLoadIdentity(); - pmv.glTranslatef(dx, dy, z0); - pmv.glScalef(fontSize, fontSize, 1.0f); + final PMVMatrix4f pmv = renderer.getMatrix(); + pmv.loadMvIdentity(); + pmv.translateMv(dx, dy, z0); + pmv.scaleMv(fontSize, fontSize, 1.0f); textRenderUtil.drawString3D(gl, renderer, font, text, null, sampleCount); lastRow = row; diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWTBugXXXX.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWTBugXXXX.java index 41b556186..ae17e7821 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWTBugXXXX.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWTBugXXXX.java @@ -37,7 +37,6 @@ import com.jogamp.opengl.GLCapabilities; import com.jogamp.opengl.GLDrawable; import com.jogamp.opengl.GLException; import com.jogamp.opengl.GLProfile; -import com.jogamp.opengl.fixedfunc.GLMatrixFunc; import org.junit.Assert; import org.junit.Test; @@ -49,11 +48,11 @@ import com.jogamp.graph.curve.opengl.RenderState; import com.jogamp.graph.curve.opengl.RegionRenderer; import com.jogamp.graph.curve.opengl.TextRegionUtil; import com.jogamp.graph.font.Font; -import com.jogamp.opengl.math.geom.AABBox; +import com.jogamp.math.geom.AABBox; +import com.jogamp.math.util.PMVMatrix4f; import com.jogamp.opengl.test.junit.util.NEWTGLContext; import com.jogamp.opengl.test.junit.util.UITestCase; import com.jogamp.opengl.util.GLReadBufferUtil; -import com.jogamp.opengl.util.PMVMatrix; @FixMethodOrder(MethodSorters.NAME_ASCENDING) @@ -195,13 +194,12 @@ public class TestTextRendererNEWTBugXXXX extends UITestCase { dx += fontSize * font.getAdvanceWidth('X') * column; dy -= fontSize * textBox.getHeight() * ( row + 1 ); - final PMVMatrix pmv = renderer.getMatrix(); - pmv.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); - pmv.glLoadIdentity(); - pmv.glTranslatef(dx, dy, z0); + final PMVMatrix4f pmv = renderer.getMatrix(); + pmv.loadMvIdentity(); + pmv.translateMv(dx, dy, z0); { final float sxy = fontSize / font.getMetrics().getUnitsPerEM(); - pmv.glScalef(sxy, sxy, 1.0f); + pmv.scaleMv(sxy, sxy, 1.0f); } textRenderUtil.drawString3D(gl, renderer, font, text, null, sampleCount); diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java b/src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java index 8e90d88eb..b09a5c2ab 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java @@ -32,7 +32,6 @@ import java.io.IOException; import com.jogamp.opengl.GL2ES2; import com.jogamp.opengl.GLAutoDrawable; import com.jogamp.opengl.GLEventListener; -import com.jogamp.opengl.fixedfunc.GLMatrixFunc; import com.jogamp.graph.curve.opengl.GLRegion; import com.jogamp.graph.curve.opengl.RenderState; @@ -42,9 +41,9 @@ import com.jogamp.graph.font.Font; import com.jogamp.graph.font.FontFactory; import com.jogamp.graph.font.FontScale; import com.jogamp.graph.font.FontSet; -import com.jogamp.graph.geom.plane.AffineTransform; +import com.jogamp.math.geom.plane.AffineTransform; +import com.jogamp.math.util.PMVMatrix4f; import com.jogamp.newt.Window; -import com.jogamp.opengl.util.PMVMatrix; public abstract class TextRendererGLELBase implements GLEventListener { public final int renderModes; @@ -53,7 +52,7 @@ public abstract class TextRendererGLELBase implements GLEventListener { protected final float[] staticRGBAColor = new float[] { 1f, 1f, 1f, 1f }; private boolean exclusivePMVMatrix = true; - private PMVMatrix sharedPMVMatrix = null; + private PMVMatrix4f sharedPMVMatrix = null; private RegionRenderer.GLCallback enableCallback=null, disableCallback=null; protected RegionRenderer renderer = null; protected TextRegionUtil textRenderUtil = null; @@ -105,7 +104,7 @@ public abstract class TextRendererGLELBase implements GLEventListener { * Must be called before {@link #init(GLAutoDrawable)}. * </p> */ - public void setSharedPMVMatrix(final PMVMatrix pmv) { + public void setSharedPMVMatrix(final PMVMatrix4f pmv) { this.sharedPMVMatrix = pmv; } @@ -245,18 +244,17 @@ public abstract class TextRendererGLELBase implements GLEventListener { dx += sxy * font.getAdvanceWidth('X') * column; dy -= sxy * lineHeight * ( row + 1 ); - final PMVMatrix pmvMatrix = renderer.getMatrix(); - pmvMatrix.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); + final PMVMatrix4f pmvMatrix = renderer.getMatrix(); if( !exclusivePMVMatrix ) { - pmvMatrix.glPushMatrix(); + pmvMatrix.pushMv(); } else { - pmvMatrix.glLoadIdentity(); + pmvMatrix.loadMvIdentity(); } - pmvMatrix.glTranslatef(dx, dy, tz); + pmvMatrix.translateMv(dx, dy, tz); if( flipVerticalInGLOrientation && drawable.isGLOriented() ) { - pmvMatrix.glScalef(sxy, -1f*sxy, 1.0f); + pmvMatrix.scaleMv(sxy, -1f*sxy, 1.0f); } else { - pmvMatrix.glScalef(sxy, sxy, 1.0f); + pmvMatrix.scaleMv(sxy, sxy, 1.0f); } renderer.enable(gl, true); if( cacheRegion ) { @@ -269,7 +267,7 @@ public abstract class TextRendererGLELBase implements GLEventListener { renderer.enable(gl, false); if( !exclusivePMVMatrix ) { - pmvMatrix.glPopMatrix(); + pmvMatrix.popMv(); } lastRow = row + newLineCount; } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMRTNEWT01.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMRTNEWT01.java index e35f084db..9f6a49ded 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMRTNEWT01.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMRTNEWT01.java @@ -119,7 +119,7 @@ public class TestFBOMRTNEWT01 extends UITestCase { st.attachShaderProgram(gl, sp1, true); final PMVMatrix pmvMatrix = new PMVMatrix(); - final GLUniformData pmvMatrixUniform = new GLUniformData("gcu_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); + final GLUniformData pmvMatrixUniform = new GLUniformData("gcu_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError()); st.ownUniform(pmvMatrixUniform); st.uniform(gl, pmvMatrixUniform); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java index efe903971..eebffdd8b 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java @@ -259,7 +259,7 @@ public class ElektronenMultiplizierer implements GLEventListener { st.uniform(gl, mScreenDimensionUniform); pmvMatrix = new PMVMatrix(); - pmvMatrixUniform = new GLUniformData("gcu_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); + pmvMatrixUniform = new GLUniformData("gcu_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); st.ownUniform(pmvMatrixUniform); st.uniform(gl, pmvMatrixUniform); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/FBOMix2DemosES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/FBOMix2DemosES2.java index 57634b581..c2f95222e 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/FBOMix2DemosES2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/FBOMix2DemosES2.java @@ -116,7 +116,7 @@ public class FBOMix2DemosES2 implements GLEventListener { sp0.add(gl, fp0, System.err); st.attachShaderProgram(gl, sp0, true); - pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); + pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); st.ownUniform(pmvMatrixUniform); st.uniform(gl, pmvMatrixUniform); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java index b0f89eb1a..1ffa30560 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java @@ -21,6 +21,10 @@ package com.jogamp.opengl.test.junit.jogl.demos.es2; import com.jogamp.common.nio.Buffers; +import com.jogamp.math.Matrix4f; +import com.jogamp.math.Quaternion; +import com.jogamp.math.Vec3f; +import com.jogamp.math.util.PMVMatrix4f; import com.jogamp.newt.Window; import com.jogamp.newt.event.GestureHandler; import com.jogamp.newt.event.KeyAdapter; @@ -32,9 +36,6 @@ import com.jogamp.newt.event.PinchToZoomGesture; import com.jogamp.newt.event.GestureHandler.GestureEvent; import com.jogamp.opengl.GLRendererQuirks; import com.jogamp.opengl.JoglVersion; -import com.jogamp.opengl.math.Matrix4f; -import com.jogamp.opengl.math.Quaternion; -import com.jogamp.opengl.math.Vec3f; import com.jogamp.opengl.test.junit.jogl.demos.GearsObject; import com.jogamp.opengl.util.CustomGLEventListener; import com.jogamp.opengl.util.PMVMatrix; @@ -172,7 +173,7 @@ public class GearsES2 implements StereoGLEventListener, TileRendererBase.TileRen public void setUseMappedBuffers(final boolean v) { useMappedBuffers = v; } public void setValidateBuffers(final boolean v) { validateBuffers = v; } - public PMVMatrix getPMVMatrix() { + public PMVMatrix4f getPMVMatrix() { return pmvMatrix; } @@ -231,9 +232,9 @@ public class GearsES2 implements StereoGLEventListener, TileRendererBase.TileRen // Use debug pipeline // drawable.setGL(new DebugGL(drawable.getGL())); - pmvMatrix = new PMVMatrix(PMVMatrix.INVERSE_MODELVIEW | PMVMatrix.INVERSE_TRANSPOSED_MODELVIEW); + pmvMatrix = new PMVMatrix(PMVMatrix4f.INVERSE_MODELVIEW | PMVMatrix4f.INVERSE_TRANSPOSED_MODELVIEW); st.attachObject("pmvMatrix", pmvMatrix); - pmvMatrixUniform = new GLUniformData("pmvMatrix", 4, 4, pmvMatrix.getSyncPMvMviMvitMat()); // P, Mv, Mvi and Mvit + pmvMatrixUniform = new GLUniformData("pmvMatrix", 4, 4, pmvMatrix.getSyncPMvMviMvit()); // P, Mv, Mvi and Mvit st.ownUniform(pmvMatrixUniform); st.uniform(gl, pmvMatrixUniform); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/LineSquareXDemoES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/LineSquareXDemoES2.java index d083b149c..3d375bcfd 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/LineSquareXDemoES2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/LineSquareXDemoES2.java @@ -77,7 +77,7 @@ public class LineSquareXDemoES2 implements GLEventListener { sp0.add(gl, fp0, System.err); st.attachShaderProgram(gl, sp0, true); - pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); + pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); st.ownUniform(pmvMatrixUniform); st.uniform(gl, pmvMatrixUniform); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/Mix2TexturesES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/Mix2TexturesES2.java index 954aeaf8e..4bcc7e3bc 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/Mix2TexturesES2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/Mix2TexturesES2.java @@ -100,7 +100,7 @@ public class Mix2TexturesES2 implements GLEventListener { sp0.add(gl, fp0, System.err); st.attachShaderProgram(gl, sp0, true); - pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); + pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); st.ownUniform(pmvMatrixUniform); st.uniform(gl, pmvMatrixUniform); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/MultisampleDemoES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/MultisampleDemoES2.java index aa89bcdc9..a6076a3d2 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/MultisampleDemoES2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/MultisampleDemoES2.java @@ -96,7 +96,7 @@ public class MultisampleDemoES2 implements GLEventListener { sp0.add(gl, fp0, System.err); st.attachShaderProgram(gl, sp0, true); - pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); + pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); st.ownUniform(pmvMatrixUniform); st.uniform(gl, pmvMatrixUniform); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/PointsDemoES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/PointsDemoES2.java index eebce5a5d..6d8d413a7 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/PointsDemoES2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/PointsDemoES2.java @@ -30,6 +30,7 @@ package com.jogamp.opengl.test.junit.jogl.demos.es2; import java.nio.FloatBuffer; import com.jogamp.common.nio.Buffers; +import com.jogamp.math.FloatUtil; import com.jogamp.opengl.test.junit.jogl.demos.PointsDemo; import com.jogamp.opengl.util.GLArrayDataServer; import com.jogamp.opengl.util.PMVMatrix; @@ -44,7 +45,6 @@ import com.jogamp.opengl.GL2GL3; import com.jogamp.opengl.GLAutoDrawable; import com.jogamp.opengl.GLUniformData; import com.jogamp.opengl.fixedfunc.GLMatrixFunc; -import com.jogamp.opengl.math.FloatUtil; public class PointsDemoES2 extends PointsDemo { ShaderState st; @@ -112,7 +112,7 @@ public class PointsDemoES2 extends PointsDemo { pmvMatrix.glLoadIdentity(); pmvMatrix.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); pmvMatrix.glLoadIdentity(); - pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); // P, Mv + pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); // P, Mv st.ownUniform(pmvMatrixUniform); st.uniform(gl, pmvMatrixUniform); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java index 0dc9eb633..f6d0b6876 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java @@ -126,7 +126,7 @@ public class RedSquareES2 implements GLEventListener, TileRendererBase.TileRende pmvMatrix.glLoadIdentity(); pmvMatrix.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); pmvMatrix.glLoadIdentity(); - pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); // P, Mv + pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); // P, Mv st.ownUniform(pmvMatrixUniform); st.uniform(gl, pmvMatrixUniform); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareMappedES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareMappedES2.java index 32f917f9f..d56575ecf 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareMappedES2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareMappedES2.java @@ -123,7 +123,7 @@ public class RedSquareMappedES2 implements GLEventListener, TileRendererBase.Til pmvMatrix.glLoadIdentity(); pmvMatrix.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); pmvMatrix.glLoadIdentity(); - pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); // P, Mv + pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); // P, Mv st.ownUniform(pmvMatrixUniform); st.uniform(gl, pmvMatrixUniform); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw01ES2Listener.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw01ES2Listener.java index 017b3e5fe..f6d9a1c97 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw01ES2Listener.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw01ES2Listener.java @@ -138,7 +138,7 @@ public class TextureDraw01ES2Listener implements GLEventListener, TextureDraw01A pmvMatrix.glLoadIdentity(); pmvMatrix.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); pmvMatrix.glLoadIdentity(); - pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); // P, Mv + pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); // P, Mv st.ownUniform(pmvMatrixUniform); if(!st.uniform(gl, pmvMatrixUniform)) { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw02ES2ListenerFBO.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw02ES2ListenerFBO.java index 02782644a..c7c852eb4 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw02ES2ListenerFBO.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureDraw02ES2ListenerFBO.java @@ -108,7 +108,7 @@ public class TextureDraw02ES2ListenerFBO implements GLEventListener { sp0.add(gl, fp0, System.err); st.attachShaderProgram(gl, sp0, true); - pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); + pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); st.ownUniform(pmvMatrixUniform); st.uniform(gl, pmvMatrixUniform); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureSequenceCubeES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureSequenceCubeES2.java index 3f4be9833..124eab460 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureSequenceCubeES2.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureSequenceCubeES2.java @@ -38,8 +38,8 @@ import com.jogamp.opengl.GLException; import com.jogamp.opengl.GLProfile; import com.jogamp.opengl.GLUniformData; import com.jogamp.opengl.fixedfunc.GLMatrixFunc; -import com.jogamp.opengl.math.FloatUtil; import com.jogamp.common.os.Platform; +import com.jogamp.math.FloatUtil; import com.jogamp.newt.Window; import com.jogamp.newt.event.MouseAdapter; import com.jogamp.newt.event.MouseEvent; @@ -227,7 +227,7 @@ public class TextureSequenceCubeES2 implements GLEventListener { pmvMatrix = new PMVMatrix(); reshapePMV(drawable.getSurfaceWidth(), drawable.getSurfaceHeight()); - pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); // P, Mv + pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); // P, Mv if(!st.uniform(gl, pmvMatrixUniform)) { throw new GLException("Error setting PMVMatrix in shader: "+st); } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl3/GeomShader01TextureGL3.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl3/GeomShader01TextureGL3.java index f0a92891a..8aa2d49f3 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl3/GeomShader01TextureGL3.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl3/GeomShader01TextureGL3.java @@ -135,7 +135,7 @@ public class GeomShader01TextureGL3 implements GLEventListener { pmvMatrix.glLoadIdentity(); pmvMatrix.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); pmvMatrix.glLoadIdentity(); - pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); // P, Mv + pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); // P, Mv st.ownUniform(pmvMatrixUniform); st.uniform(gl, pmvMatrixUniform); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl4/TriangleInstancedRendererWithShaderState.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl4/TriangleInstancedRendererWithShaderState.java index da799906a..7acbb034a 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl4/TriangleInstancedRendererWithShaderState.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl4/TriangleInstancedRendererWithShaderState.java @@ -7,6 +7,9 @@ import java.io.PrintStream; import java.nio.FloatBuffer; import java.util.Random; +import com.jogamp.math.FloatUtil; +import com.jogamp.math.Matrix4f; +import com.jogamp.math.Vec3f; import com.jogamp.opengl.DebugGL4; import com.jogamp.opengl.GL; import com.jogamp.opengl.GL2ES2; @@ -17,9 +20,6 @@ import com.jogamp.opengl.GLException; import com.jogamp.opengl.GLUniformData; import com.jogamp.opengl.TraceGL4; import com.jogamp.opengl.fixedfunc.GLMatrixFunc; -import com.jogamp.opengl.math.FloatUtil; -import com.jogamp.opengl.math.Matrix4f; -import com.jogamp.opengl.math.Vec3f; import com.jogamp.opengl.util.GLArrayDataClient; import com.jogamp.opengl.util.GLArrayDataServer; import com.jogamp.opengl.util.PMVMatrix; @@ -104,7 +104,7 @@ public class TriangleInstancedRendererWithShaderState implements GLEventListener initShader(gl); projectionMatrix = new PMVMatrix(); - projectionMatrixUniform = new GLUniformData("mgl_PMatrix", 4, 4, projectionMatrix.getSyncPMat()); + projectionMatrixUniform = new GLUniformData("mgl_PMatrix", 4, 4, projectionMatrix.getSyncP()); st.ownUniform(projectionMatrixUniform); if(!st.uniform(gl, projectionMatrixUniform)) { throw new GLException("Error setting mgl_PMatrix in shader: " + st); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl4/TrianglesInstancedRendererHardcoded.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl4/TrianglesInstancedRendererHardcoded.java index 986f60550..7ee7c0e7c 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl4/TrianglesInstancedRendererHardcoded.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl4/TrianglesInstancedRendererHardcoded.java @@ -16,9 +16,9 @@ import com.jogamp.opengl.GLEventListener; import com.jogamp.opengl.TraceGL4; import com.jogamp.opengl.fixedfunc.GLMatrixFunc; import com.jogamp.common.nio.Buffers; -import com.jogamp.opengl.math.FloatUtil; -import com.jogamp.opengl.math.Matrix4f; -import com.jogamp.opengl.math.Vec3f; +import com.jogamp.math.FloatUtil; +import com.jogamp.math.Matrix4f; +import com.jogamp.math.Vec3f; import com.jogamp.opengl.util.PMVMatrix; public class TrianglesInstancedRendererHardcoded implements GLEventListener { @@ -100,7 +100,7 @@ public class TrianglesInstancedRendererHardcoded implements GLEventListener { winScale = view.getScale(); } projectionMatrix.glScalef(winScale, winScale, winScale); - gl.glUniformMatrix4fv(projectionMatrixLocation, 1, false, projectionMatrix.getSyncPMat().getSyncFloats()); + gl.glUniformMatrix4fv(projectionMatrixLocation, 1, false, projectionMatrix.getSyncP().getSyncFloats()); projectionMatrix.glPopMatrix(); generateTriangleTransform(); gl.glUniformMatrix4fv(transformMatrixLocation, NO_OF_INSTANCE, false, triangleTransform); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java index cd68eb0ce..194ea338f 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java @@ -39,6 +39,7 @@ import com.jogamp.opengl.test.junit.util.UITestCase; import java.io.IOException; +import com.jogamp.math.FloatUtil; import com.jogamp.opengl.GL; import com.jogamp.opengl.GL2ES2; import com.jogamp.opengl.GLCapabilities; @@ -46,7 +47,6 @@ import com.jogamp.opengl.GLDrawable; import com.jogamp.opengl.GLProfile; import com.jogamp.opengl.GLUniformData; import com.jogamp.opengl.fixedfunc.GLMatrixFunc; -import com.jogamp.opengl.math.FloatUtil; import org.junit.Assert; import org.junit.Test; @@ -126,7 +126,7 @@ public class TestGLSLShaderState01NEWT extends UITestCase { // setup mgl_PMVMatrix final PMVMatrix pmvMatrix = new PMVMatrix(); - final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); + final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError()); pmvMatrixUniform.setLocation(gl, sp.program()); gl.glUniform(pmvMatrixUniform); @@ -245,7 +245,7 @@ public class TestGLSLShaderState01NEWT extends UITestCase { // setup mgl_PMVMatrix final PMVMatrix pmvMatrix = new PMVMatrix(); - final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); + final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError()); st.ownUniform(pmvMatrixUniform); @@ -337,7 +337,7 @@ public class TestGLSLShaderState01NEWT extends UITestCase { // setup mgl_PMVMatrix final PMVMatrix pmvMatrix = new PMVMatrix(); - final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); + final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); st.ownUniform(pmvMatrixUniform); st.uniform(gl, pmvMatrixUniform); @@ -426,7 +426,7 @@ public class TestGLSLShaderState01NEWT extends UITestCase { // setup mgl_PMVMatrix final PMVMatrix pmvMatrix = new PMVMatrix(); - final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); + final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); st.ownUniform(pmvMatrixUniform); st.uniform(gl, pmvMatrixUniform); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java index 73c166abb..7db859f41 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java @@ -39,6 +39,7 @@ import com.jogamp.opengl.test.junit.util.UITestCase; import java.io.IOException; +import com.jogamp.math.FloatUtil; import com.jogamp.opengl.GL; import com.jogamp.opengl.GL2ES2; import com.jogamp.opengl.GLCapabilities; @@ -47,7 +48,6 @@ import com.jogamp.opengl.GLDrawable; import com.jogamp.opengl.GLProfile; import com.jogamp.opengl.GLUniformData; import com.jogamp.opengl.fixedfunc.GLMatrixFunc; -import com.jogamp.opengl.math.FloatUtil; import org.junit.Assert; import org.junit.Test; @@ -117,7 +117,7 @@ public class TestGLSLShaderState02NEWT extends UITestCase { // setup mgl_PMVMatrix final PMVMatrix pmvMatrix = new PMVMatrix(); - final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); + final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); st.ownUniform(pmvMatrixUniform); st.uniform(gl, pmvMatrixUniform); @@ -320,7 +320,7 @@ com.jogamp.opengl.GLException: Thread[main,5,main] glGetError() returned the fol // setup mgl_PMVMatrix final PMVMatrix pmvMatrix = new PMVMatrix(); - final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); + final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); st.ownUniform(pmvMatrixUniform); Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError()); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java index 5d571bc09..438138533 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java @@ -83,7 +83,7 @@ public class TestRulerNEWT01 extends UITestCase { glWindow.addGLEventListener(new GLEventListener() { final ShaderState st = new ShaderState(); final PMVMatrix pmvMatrix = new PMVMatrix(); - final GLUniformData pmvMatrixUniform = new GLUniformData("gcu_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat()); + final GLUniformData pmvMatrixUniform = new GLUniformData("gcu_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv()); final GLArrayDataServer vertices0 = GLArrayDataServer.createGLSL("gca_Vertices", 3, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW); final GLUniformData rulerPixFreq = new GLUniformData("gcu_RulerPixFreq", 2, Buffers.newDirectFloatBuffer(2)); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2Screen.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2Screen.java index b82d70923..6355ad095 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2Screen.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2Screen.java @@ -30,13 +30,13 @@ package com.jogamp.opengl.test.junit.jogl.offscreen; import java.nio.*; +import com.jogamp.math.FloatUtil; import com.jogamp.opengl.*; import com.jogamp.opengl.fixedfunc.*; import com.jogamp.opengl.util.*; import com.jogamp.opengl.fixedfunc.GLPointerFunc; -import com.jogamp.opengl.math.FloatUtil; import com.jogamp.opengl.util.texture.TextureCoords; import com.jogamp.opengl.util.GLArrayDataClient; import com.jogamp.opengl.util.GLArrayDataServer; @@ -108,7 +108,7 @@ public class ReadBuffer2Screen extends ReadBufferBase { pmvMatrix.glTranslatef(0, 0, -2.5f); if(null!=glM) { glM.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); - glM.glLoadMatrixf(pmvMatrix.getSyncMvMat().getSyncFloats()); + glM.glLoadMatrixf(pmvMatrix.getSyncMv().getSyncFloats()); } // Set location in front of camera @@ -117,7 +117,7 @@ public class ReadBuffer2Screen extends ReadBufferBase { pmvMatrix.gluPerspective(FloatUtil.QUARTER_PI, (float)width / (float)height, 1.0f, 100.0f); if(null!=glM) { glM.glMatrixMode(GLMatrixFunc.GL_PROJECTION); - glM.glLoadMatrixf(pmvMatrix.getSyncPMat().getSyncFloats()); + glM.glLoadMatrixf(pmvMatrix.getSyncP().getSyncFloats()); } } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/DemoGL2ES2ImmModeSink.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/DemoGL2ES2ImmModeSink.java index 46c9fc2c2..02fabce6b 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/util/DemoGL2ES2ImmModeSink.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/DemoGL2ES2ImmModeSink.java @@ -89,7 +89,7 @@ public class DemoGL2ES2ImmModeSink implements GLEventListener { sp.useProgram(gl, true); } - pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMvMat().getSyncFloats()); + pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.getSyncPMv().getSyncFloats()); if(null != st) { st.ownUniform(pmvMatrixUniform); st.uniform(gl, pmvMatrixUniform); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/Matrix4fb.java b/src/test/com/jogamp/opengl/test/junit/math/Matrix4fb.java index feb9b6f46..a151eec96 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/Matrix4fb.java +++ b/src/test/com/jogamp/opengl/test/junit/math/Matrix4fb.java @@ -26,20 +26,20 @@ * or implied, of JogAmp Community. */ -package com.jogamp.opengl.test.junit.jogl.math; +package com.jogamp.opengl.test.junit.math; import java.nio.FloatBuffer; -import com.jogamp.opengl.math.FloatUtil; -import com.jogamp.opengl.math.FovHVHalves; -import com.jogamp.opengl.math.Quaternion; -import com.jogamp.opengl.math.Ray; -import com.jogamp.opengl.math.Vec3f; -import com.jogamp.opengl.math.Vec4f; -import com.jogamp.opengl.math.VectorUtil; -import com.jogamp.opengl.math.geom.AABBox; -import com.jogamp.opengl.math.geom.Frustum; -import com.jogamp.opengl.math.geom.Frustum.Plane; +import com.jogamp.math.FloatUtil; +import com.jogamp.math.FovHVHalves; +import com.jogamp.math.Quaternion; +import com.jogamp.math.Ray; +import com.jogamp.math.Vec3f; +import com.jogamp.math.Vec4f; +import com.jogamp.math.VectorUtil; +import com.jogamp.math.geom.AABBox; +import com.jogamp.math.geom.Frustum; +import com.jogamp.math.geom.Frustum.Plane; /** * Basic 4x4 float matrix implementation using fields for intensive use-cases (host operations). diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestBinary16NOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestBinary16NOUI.java index 5e4166a49..6fecb1f23 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestBinary16NOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestBinary16NOUI.java @@ -26,14 +26,14 @@ * or implied, of JogAmp Community. */ -package com.jogamp.opengl.test.junit.jogl.math; +package com.jogamp.opengl.test.junit.math; import org.junit.Assert; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runners.MethodSorters; -import com.jogamp.opengl.math.Binary16; +import com.jogamp.math.Binary16; import com.jogamp.opengl.test.junit.util.MiscUtils; import com.jogamp.opengl.test.junit.util.UITestCase; diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestBinary32NOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestBinary32NOUI.java index ba59eddec..9eda98cc9 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestBinary32NOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestBinary32NOUI.java @@ -26,13 +26,13 @@ * or implied, of JogAmp Community. */ -package com.jogamp.opengl.test.junit.jogl.math; +package com.jogamp.opengl.test.junit.math; import org.junit.Assert; import org.junit.Test; import com.jogamp.junit.util.JunitTracer; -import com.jogamp.opengl.math.Binary32; +import com.jogamp.math.Binary32; public class TestBinary32NOUI extends JunitTracer { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestBinary64NOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestBinary64NOUI.java index 8e635f128..e65776635 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestBinary64NOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestBinary64NOUI.java @@ -26,13 +26,13 @@ * or implied, of JogAmp Community. */ -package com.jogamp.opengl.test.junit.jogl.math; +package com.jogamp.opengl.test.junit.math; import org.junit.Assert; import org.junit.Test; import com.jogamp.junit.util.JunitTracer; -import com.jogamp.opengl.math.Binary64; +import com.jogamp.math.Binary64; public class TestBinary64NOUI extends JunitTracer { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestFloatUtil01NOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestFloatUtil01NOUI.java index 1c2b32fcb..aae2b02e0 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestFloatUtil01NOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestFloatUtil01NOUI.java @@ -26,7 +26,7 @@ * or implied, of JogAmp Community.
*/
-package com.jogamp.opengl.test.junit.jogl.math;
+package com.jogamp.opengl.test.junit.math;
@@ -37,7 +37,7 @@ import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters;
import com.jogamp.junit.util.JunitTracer;
-import com.jogamp.opengl.math.FloatUtil;
+import com.jogamp.math.FloatUtil;
@FixMethodOrder(MethodSorters.NAME_ASCENDING) public class TestFloatUtil01NOUI extends JunitTracer {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestGluUnprojectDoubleNOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestGluUnprojectDoubleNOUI.java index 7d7ec47d6..5cd11d30e 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestGluUnprojectDoubleNOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestGluUnprojectDoubleNOUI.java @@ -26,7 +26,7 @@ * or implied, of JogAmp Community. */ -package com.jogamp.opengl.test.junit.jogl.math; +package com.jogamp.opengl.test.junit.math; import com.jogamp.junit.util.JunitTracer; import com.jogamp.opengl.glu.GLU; diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestGluUnprojectFloatNOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestGluUnprojectFloatNOUI.java index 55df4bcd4..cd119d5a3 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestGluUnprojectFloatNOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestGluUnprojectFloatNOUI.java @@ -26,7 +26,7 @@ * or implied, of JogAmp Community. */ -package com.jogamp.opengl.test.junit.jogl.math; +package com.jogamp.opengl.test.junit.math; import com.jogamp.junit.util.JunitTracer; import com.jogamp.opengl.glu.GLU; diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestMatrix4f01NOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestMatrix4f01NOUI.java index 2657bce03..5c4a0f4ca 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestMatrix4f01NOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestMatrix4f01NOUI.java @@ -26,7 +26,7 @@ * or implied, of JogAmp Community. */ -package com.jogamp.opengl.test.junit.jogl.math; +package com.jogamp.opengl.test.junit.math; import org.junit.Assert; import org.junit.Test; @@ -34,9 +34,9 @@ import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; import com.jogamp.junit.util.JunitTracer; -import com.jogamp.opengl.math.FloatUtil; -import com.jogamp.opengl.math.Matrix4f; -import com.jogamp.opengl.math.Vec3f; +import com.jogamp.math.FloatUtil; +import com.jogamp.math.Matrix4f; +import com.jogamp.math.Vec3f; @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class TestMatrix4f01NOUI extends JunitTracer { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestMatrix4f02MulNOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestMatrix4f02MulNOUI.java index b040caed9..a2cc5a3f3 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestMatrix4f02MulNOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestMatrix4f02MulNOUI.java @@ -26,7 +26,7 @@ * or implied, of JogAmp Community.
*/
-package com.jogamp.opengl.test.junit.jogl.math;
+package com.jogamp.opengl.test.junit.math;
import org.junit.Assert;
import org.junit.Test; @@ -35,8 +35,8 @@ import org.junit.runners.MethodSorters; import com.jogamp.common.os.Platform;
import com.jogamp.junit.util.JunitTracer;
-import com.jogamp.opengl.math.FloatUtil;
-import com.jogamp.opengl.math.Matrix4f;
+import com.jogamp.math.FloatUtil;
+import com.jogamp.math.Matrix4f;
@FixMethodOrder(MethodSorters.NAME_ASCENDING) public class TestMatrix4f02MulNOUI extends JunitTracer {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestMatrix4f03InversionNOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestMatrix4f03InversionNOUI.java index 268d4271d..ae0d8d739 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestMatrix4f03InversionNOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestMatrix4f03InversionNOUI.java @@ -26,7 +26,7 @@ * or implied, of JogAmp Community.
*/
-package com.jogamp.opengl.test.junit.jogl.math;
+package com.jogamp.opengl.test.junit.math;
import org.junit.Assert;
import org.junit.Test; @@ -35,8 +35,8 @@ import org.junit.runners.MethodSorters; import com.jogamp.common.os.Platform;
import com.jogamp.junit.util.JunitTracer;
-import com.jogamp.opengl.math.FloatUtil;
-import com.jogamp.opengl.math.Matrix4f;
+import com.jogamp.math.FloatUtil;
+import com.jogamp.math.Matrix4f;
@FixMethodOrder(MethodSorters.NAME_ASCENDING) public class TestMatrix4f03InversionNOUI extends JunitTracer {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestMatrix4fMatrixMulNOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestMatrix4fMatrixMulNOUI.java index 67099cfab..1352d36c5 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestMatrix4fMatrixMulNOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestMatrix4fMatrixMulNOUI.java @@ -26,7 +26,7 @@ * or implied, of JogAmp Community. */ -package com.jogamp.opengl.test.junit.jogl.math; +package com.jogamp.opengl.test.junit.math; import org.junit.Assert; import org.junit.Test; @@ -34,7 +34,7 @@ import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; import com.jogamp.junit.util.JunitTracer; -import com.jogamp.opengl.math.Matrix4f; +import com.jogamp.math.Matrix4f; @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class TestMatrix4fMatrixMulNOUI extends JunitTracer { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestMatrix4fProject01NOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestMatrix4fProject01NOUI.java index b22bf9ad7..69b103541 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestMatrix4fProject01NOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestMatrix4fProject01NOUI.java @@ -25,21 +25,21 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of JogAmp Community. */ -package com.jogamp.opengl.test.junit.jogl.math; +package com.jogamp.opengl.test.junit.math; import java.util.Arrays; import com.jogamp.common.nio.Buffers; import com.jogamp.junit.util.JunitTracer; +import com.jogamp.math.FloatUtil; +import com.jogamp.math.Matrix4f; +import com.jogamp.math.Recti; +import com.jogamp.math.Vec3f; import com.jogamp.opengl.fixedfunc.GLMatrixFunc; import com.jogamp.opengl.glu.GLU; import jogamp.opengl.gl2.ProjectDouble; -import com.jogamp.opengl.math.FloatUtil; -import com.jogamp.opengl.math.Matrix4f; -import com.jogamp.opengl.math.Recti; -import com.jogamp.opengl.math.Vec3f; import com.jogamp.opengl.util.PMVMatrix; import org.junit.Assert; @@ -74,15 +74,15 @@ public class TestMatrix4fProject01NOUI extends JunitTracer { final PMVMatrix m = new PMVMatrix(); final Matrix4f mat4PMv = new Matrix4f(); - m.mulPMvMat(mat4PMv); + m.getMulPMv(mat4PMv); System.err.println(mat4PMv.toString(null, "mat4PMv", "%10.5f")); - m.gluProject(new Vec3f(1f, 0f, 0f), viewport, winA00); // separate P + Mv + m.mapObjToWin(new Vec3f(1f, 0f, 0f), viewport, winA00); // separate P + Mv System.err.println("A.0.0 - Project 1,0 -->" + winA00); Matrix4f.mapObjToWin(new Vec3f(1f, 0f, 0f), mat4PMv, viewport, winB00); // single PMv System.err.println("B.0.0 - Project 1,0 -->" + winB00); - m.gluProject(new Vec3f(0f, 0f, 0f), viewport, winA01); + m.mapObjToWin(new Vec3f(0f, 0f, 0f), viewport, winA01); System.err.println("A.0.1 - Project 0,0 -->" + winA01); Matrix4f.mapObjToWin(new Vec3f(0f, 0f, 0f), mat4PMv, viewport, winB01); System.err.println("B.0.1 - Project 0,0 -->" + winB01); @@ -91,15 +91,15 @@ public class TestMatrix4fProject01NOUI extends JunitTracer { m.glOrthof(0, 10, 0, 10, 1, -1); System.err.println("MATRIX - Ortho 0,0,10,10 - Locate the origin in the bottom left and scale"); System.err.println(m); - m.mulPMvMat(mat4PMv); + m.getMulPMv(mat4PMv); System.err.println(mat4PMv.toString(null, "mat4PMv", "%10.5f")); - m.gluProject(new Vec3f(1f, 0f, 0f), viewport, winA10); + m.mapObjToWin(new Vec3f(1f, 0f, 0f), viewport, winA10); System.err.println("A.1.0 - Project 1,0 -->" +winA10); Matrix4f.mapObjToWin(new Vec3f(1f, 0f, 0f), mat4PMv, viewport, winB10); System.err.println("B.1.0 - Project 1,0 -->" +winB10); - m.gluProject(new Vec3f(0f, 0f, 0f), viewport, winA11); + m.mapObjToWin(new Vec3f(0f, 0f, 0f), viewport, winA11); System.err.println("A.1.1 - Project 0,0 -->" +winA11); Matrix4f.mapObjToWin(new Vec3f(0f, 0f, 0f), mat4PMv, viewport, winB11); System.err.println("B.1.1 - Project 0,0 -->" +winB11); @@ -140,15 +140,15 @@ public class TestMatrix4fProject01NOUI extends JunitTracer { mat4P.load( m.getMat(GLMatrixFunc.GL_PROJECTION_MATRIX) ); Assert.assertEquals(new Matrix4f(mat4Mv_f16), mat4Mv); Assert.assertEquals(new Matrix4f(mat4P_f16), mat4P); - Assert.assertEquals(mat4Mv, m.getMvMat()); - Assert.assertEquals(mat4P, m.getPMat()); + Assert.assertEquals(mat4Mv, m.getMv()); + Assert.assertEquals(mat4P, m.getP()); - m.gluProject(new Vec3f(1f, 0f, 0f), viewport, winA00); + m.mapObjToWin(new Vec3f(1f, 0f, 0f), viewport, winA00); System.err.println("A.0.0 - Project 1,0 -->" + winA00); Matrix4f.mapObjToWin(new Vec3f(1f, 0f, 0f), mat4Mv, mat4P, viewport, winB00); System.err.println("B.0.0 - Project 1,0 -->" + winB00); - m.gluProject(new Vec3f(0f, 0f, 0f), viewport, winA01); + m.mapObjToWin(new Vec3f(0f, 0f, 0f), viewport, winA01); System.err.println("A.0.1 - Project 0,0 -->" + winA01); Matrix4f.mapObjToWin(new Vec3f(0f, 0f, 0f), mat4Mv, mat4P, viewport, winB01); System.err.println("B.0.1 - Project 0,0 -->" + winB01); @@ -165,15 +165,15 @@ public class TestMatrix4fProject01NOUI extends JunitTracer { mat4P.load( m.getMat(GLMatrixFunc.GL_PROJECTION_MATRIX) ); Assert.assertEquals(new Matrix4f(mat4Mv_f16), mat4Mv); Assert.assertEquals(new Matrix4f(mat4P_f16), mat4P); - Assert.assertEquals(mat4Mv, m.getMvMat()); - Assert.assertEquals(mat4P, m.getPMat()); + Assert.assertEquals(mat4Mv, m.getMv()); + Assert.assertEquals(mat4P, m.getP()); - m.gluProject(new Vec3f(1f, 0f, 0f), viewport, winA10); + m.mapObjToWin(new Vec3f(1f, 0f, 0f), viewport, winA10); System.err.println("A.1.0 - Project 1,0 -->" +winA10); Matrix4f.mapObjToWin(new Vec3f(1f, 0f, 0f), mat4Mv, mat4P, viewport, winB10); System.err.println("B.1.0 - Project 1,0 -->" +winB10); - m.gluProject(new Vec3f(0f, 0f, 0f), viewport, winA11); + m.mapObjToWin(new Vec3f(0f, 0f, 0f), viewport, winA11); System.err.println("A.1.1 - Project 0,0 -->" +winA11); Matrix4f.mapObjToWin(new Vec3f(0f, 0f, 0f), mat4Mv, mat4P, viewport, winB11); System.err.println("B.1.1 - Project 0,0 -->" +winB11); @@ -209,8 +209,8 @@ public class TestMatrix4fProject01NOUI extends JunitTracer { m.glGetFloatv(GLMatrixFunc.GL_PROJECTION_MATRIX, mat4P_f16, 0); System.err.println(FloatUtil.matrixToString(null, "mat4Mv", "%10.5f", mat4Mv_f16, 0, 4, 4, false /* rowMajorOrder */)); System.err.println(FloatUtil.matrixToString(null, "mat4P ", "%10.5f", mat4P_f16, 0, 4, 4, false /* rowMajorOrder */)); - mat4Mv.load( m.getMvMat() ); - mat4P.load( m.getPMat() ); + mat4Mv.load( m.getMv() ); + mat4P.load( m.getP() ); glu.gluProject(1f, 0f, 0f, mat4Mv_f16, 0, mat4P_f16, 0, viewport_i4, 0, winA00, 0); System.err.println("A.0.0 - Project 1,0 -->" + winA00); @@ -230,8 +230,8 @@ public class TestMatrix4fProject01NOUI extends JunitTracer { m.glGetFloatv(GLMatrixFunc.GL_PROJECTION_MATRIX, mat4P_f16, 0); System.err.println(FloatUtil.matrixToString(null, "mat4Mv", "%10.5f", mat4Mv_f16, 0, 4, 4, false /* rowMajorOrder */)); System.err.println(FloatUtil.matrixToString(null, "mat4P ", "%10.5f", mat4P_f16, 0, 4, 4, false /* rowMajorOrder */)); - mat4Mv.load( m.getMvMat() ); - mat4P.load( m.getPMat() ); + mat4Mv.load( m.getMv() ); + mat4P.load( m.getP() ); glu.gluProject(1f, 0f, 0f, mat4Mv_f16, 0, mat4P_f16, 0, viewport_i4, 0, winA10, 0); System.err.println("A.1.0 - Project 1,0 -->" +winA10); @@ -274,8 +274,8 @@ public class TestMatrix4fProject01NOUI extends JunitTracer { m.glGetFloatv(GLMatrixFunc.GL_PROJECTION_MATRIX, mat4P_f16, 0); System.err.println(FloatUtil.matrixToString(null, "mat4Mv", "%10.5f", mat4Mv_f16, 0, 4, 4, false /* rowMajorOrder */)); System.err.println(FloatUtil.matrixToString(null, "mat4P ", "%10.5f", mat4P_f16, 0, 4, 4, false /* rowMajorOrder */)); - mat4Mv.load( m.getMvMat() ); - mat4P.load( m.getPMat() ); + mat4Mv.load( m.getMv() ); + mat4P.load( m.getP() ); double[] mat4Mv_d16 = Buffers.getDoubleArray(mat4Mv_f16, 0, null, 0, -1); double[] mat4P_d16 = Buffers.getDoubleArray(mat4P_f16, 0, null, 0, -1); @@ -297,8 +297,8 @@ public class TestMatrix4fProject01NOUI extends JunitTracer { m.glGetFloatv(GLMatrixFunc.GL_PROJECTION_MATRIX, mat4P_f16, 0); System.err.println(FloatUtil.matrixToString(null, "mat4Mv", "%10.5f", mat4Mv_f16, 0, 4, 4, false /* rowMajorOrder */)); System.err.println(FloatUtil.matrixToString(null, "mat4P ", "%10.5f", mat4P_f16, 0, 4, 4, false /* rowMajorOrder */)); - mat4Mv.load( m.getMvMat() ); - mat4P.load( m.getPMat() ); + mat4Mv.load( m.getMv() ); + mat4P.load( m.getP() ); mat4Mv_d16 = Buffers.getDoubleArray(mat4Mv_f16, 0, null, 0, -1); mat4P_d16 = Buffers.getDoubleArray(mat4P_f16, 0, null, 0, -1); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestMatrix4fProject02NOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestMatrix4fProject02NOUI.java index 329c122ac..f2f3ebb0d 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestMatrix4fProject02NOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestMatrix4fProject02NOUI.java @@ -25,17 +25,16 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of JogAmp Community. */ -package com.jogamp.opengl.test.junit.jogl.math; +package com.jogamp.opengl.test.junit.math; import java.util.Arrays; import com.jogamp.junit.util.JunitTracer; - -import com.jogamp.opengl.math.FloatUtil; -import com.jogamp.opengl.math.Matrix4f; -import com.jogamp.opengl.math.Recti; -import com.jogamp.opengl.math.Vec2f; -import com.jogamp.opengl.math.Vec3f; +import com.jogamp.math.FloatUtil; +import com.jogamp.math.Matrix4f; +import com.jogamp.math.Recti; +import com.jogamp.math.Vec2f; +import com.jogamp.math.Vec3f; import org.junit.Assert; import org.junit.Test; diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestPMVMatrix01NEWT.java b/src/test/com/jogamp/opengl/test/junit/math/TestPMVMatrix01NEWT.java index 7119a7c48..055cddb36 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestPMVMatrix01NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestPMVMatrix01NEWT.java @@ -26,10 +26,13 @@ * or implied, of JogAmp Community. */ -package com.jogamp.opengl.test.junit.jogl.math; +package com.jogamp.opengl.test.junit.math; import java.nio.FloatBuffer; +import com.jogamp.math.FloatUtil; +import com.jogamp.math.Matrix4f; +import com.jogamp.math.util.PMVMatrix4f; import com.jogamp.opengl.GL2ES1; import com.jogamp.opengl.GLCapabilities; import com.jogamp.opengl.GLContext; @@ -47,8 +50,6 @@ import org.junit.Test; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; -import com.jogamp.opengl.math.FloatUtil; -import com.jogamp.opengl.math.Matrix4f; import com.jogamp.opengl.test.junit.util.MiscUtils; import com.jogamp.opengl.test.junit.util.UITestCase; import com.jogamp.opengl.util.PMVMatrix; @@ -147,7 +148,7 @@ public class TestPMVMatrix01NEWT extends UITestCase { Assert.assertEquals(0, pmv.getReqBits()); Assert.assertEquals(false, pmv.isReqDirty()); Assert.assertTrue(0 != pmv.getDirtyBits()); - Assert.assertEquals(PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals(PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); // // Action #0 @@ -156,7 +157,7 @@ public class TestPMVMatrix01NEWT extends UITestCase { { pmv.glMatrixMode(GLMatrixFunc.GL_PROJECTION); pmv.glLoadIdentity(); - ident = pmv.getPMat(); + ident = pmv.getP(); pmv.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); pmv.glLoadIdentity(); @@ -165,7 +166,7 @@ public class TestPMVMatrix01NEWT extends UITestCase { Assert.assertTrue(0 == pmv.getModifiedBits(false)); // clear & test Assert.assertTrue(0 != pmv.getDirtyBits()); Assert.assertEquals(false, pmv.isReqDirty()); - Assert.assertEquals(PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals(PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); // // Action #1 @@ -177,30 +178,30 @@ public class TestPMVMatrix01NEWT extends UITestCase { Assert.assertEquals(false, pmv.isReqDirty()); Assert.assertTrue(0 != pmv.getDirtyBits()); - Assert.assertEquals(PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals(PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); Assert.assertEquals("Update has been perfomed, but non requested", false, pmv.update()); // nothing has been requested // System.err.println("P2: "+pmv.toString()); // // Get // - p = pmv.getPMat(); + p = pmv.getP(); MiscUtils.assertMatrix4fEquals("P not identity, "+pmv.toString(), ident, p, epsilon); - mv = pmv.getMvMat(); + mv = pmv.getMv(); MiscUtils.assertMatrix4fEquals("Mv not translated123, "+pmv.toString(), translated123C, mv, epsilon); { IllegalArgumentException e = null; try { - pmv.getMviMat(); + pmv.getMvi(); } catch(final IllegalArgumentException iae) { e = iae; } Assert.assertNotNull(e); } - Assert.assertEquals(PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals(PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); Assert.assertNotNull(pmv.getFrustum()); // FIXME: Test Frustum value! - Assert.assertNotNull(pmv.getPMvMat()); // FIXME: Test value! - Assert.assertNotNull(pmv.getPMviMat()); // FIXME: Test value! + Assert.assertNotNull(pmv.getPMv()); // FIXME: Test value! + Assert.assertNotNull(pmv.getPMvi()); // FIXME: Test value! Assert.assertEquals(0, pmv.getDirtyBits()); // System.err.println("P3: "+pmv.toString()); @@ -209,7 +210,7 @@ public class TestPMVMatrix01NEWT extends UITestCase { // pmv.glLoadIdentity(); // all dirty Assert.assertTrue(0 != pmv.getModifiedBits(true)); // clear & test - Assert.assertEquals(PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals(PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); System.err.println("test01a.PX: "+pmv.toString()); } @@ -222,16 +223,16 @@ public class TestPMVMatrix01NEWT extends UITestCase { @Test public void test01bTraditionalAccess() { Matrix4f p, mv, mvi, mvit; - final PMVMatrix pmv = new PMVMatrix(PMVMatrix.INVERSE_MODELVIEW | PMVMatrix.INVERSE_TRANSPOSED_MODELVIEW); + final PMVMatrix pmv = new PMVMatrix(PMVMatrix4f.INVERSE_MODELVIEW | PMVMatrix4f.INVERSE_TRANSPOSED_MODELVIEW); System.err.println("test01b.P0: "+pmv.toString()); - Assert.assertEquals(PMVMatrix.INVERSE_MODELVIEW | PMVMatrix.INVERSE_TRANSPOSED_MODELVIEW, pmv.getReqBits()); + Assert.assertEquals(PMVMatrix4f.INVERSE_MODELVIEW | PMVMatrix4f.INVERSE_TRANSPOSED_MODELVIEW, pmv.getReqBits()); Assert.assertTrue(0 != pmv.getDirtyBits()); Assert.assertEquals(true, pmv.isReqDirty()); - Assert.assertEquals(PMVMatrix.INVERSE_MODELVIEW | PMVMatrix.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals(PMVMatrix4f.INVERSE_MODELVIEW | PMVMatrix4f.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); Assert.assertTrue("Dirty bits clean, "+pmv.toString(), 0 != pmv.getDirtyBits()); - Assert.assertEquals("Remaining dirty bits not Mvi|Mvit|Frustum, "+pmv.toString(), PMVMatrix.INVERSE_MODELVIEW | PMVMatrix.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals("Remaining dirty bits not Mvi|Mvit|Frustum, "+pmv.toString(), PMVMatrix4f.INVERSE_MODELVIEW | PMVMatrix4f.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); // // Action #0 @@ -240,14 +241,14 @@ public class TestPMVMatrix01NEWT extends UITestCase { { pmv.glMatrixMode(GLMatrixFunc.GL_PROJECTION); pmv.glLoadIdentity(); - ident = pmv.getPMat(); + ident = pmv.getP(); pmv.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); pmv.glLoadIdentity(); } Assert.assertTrue("Modified bits zero", 0 != pmv.getModifiedBits(true)); // clear & test Assert.assertTrue("Dirty bits clean, "+pmv.toString(), 0 != pmv.getDirtyBits()); - Assert.assertEquals("Remaining dirty bits not Mvi|Mvit|Frustum, "+pmv.toString(), PMVMatrix.INVERSE_MODELVIEW|PMVMatrix.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals("Remaining dirty bits not Mvi|Mvit|Frustum, "+pmv.toString(), PMVMatrix4f.INVERSE_MODELVIEW|PMVMatrix4f.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); // // Action #1 @@ -255,17 +256,17 @@ public class TestPMVMatrix01NEWT extends UITestCase { pmv.glTranslatef(1f, 2f, 3f); // all dirty ! Assert.assertTrue("Modified bits zero", 0 != pmv.getModifiedBits(true)); // clear & test Assert.assertTrue("Dirty bits clean, "+pmv.toString(), 0 != pmv.getDirtyBits()); - Assert.assertEquals("Remaining dirty bits not Mvi|Mvit|Frustum, "+pmv.toString(), PMVMatrix.INVERSE_MODELVIEW|PMVMatrix.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals("Remaining dirty bits not Mvi|Mvit|Frustum, "+pmv.toString(), PMVMatrix4f.INVERSE_MODELVIEW|PMVMatrix4f.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); System.err.println("test01b.P1: "+pmv.toString()); - Assert.assertEquals(PMVMatrix.INVERSE_MODELVIEW | PMVMatrix.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals(PMVMatrix4f.INVERSE_MODELVIEW | PMVMatrix4f.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); Assert.assertEquals(true, pmv.isReqDirty()); Assert.assertEquals(true, pmv.update()); - Assert.assertEquals(PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals(PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); Assert.assertEquals(false, pmv.isReqDirty()); Assert.assertNotNull(pmv.getFrustum()); // FIXME: Test Frustum value! - Assert.assertNotNull(pmv.getPMvMat()); // FIXME: Test value! - Assert.assertNotNull(pmv.getPMviMat()); // FIXME: Test value! + Assert.assertNotNull(pmv.getPMv()); // FIXME: Test value! + Assert.assertNotNull(pmv.getPMvi()); // FIXME: Test value! Assert.assertEquals(0, pmv.getDirtyBits()); Assert.assertEquals(false, pmv.isReqDirty()); // System.err.println("P2: "+pmv.toString()); @@ -273,23 +274,23 @@ public class TestPMVMatrix01NEWT extends UITestCase { // // Get // - p = pmv.getPMat(); + p = pmv.getP(); MiscUtils.assertMatrix4fEquals("P not identity, "+pmv.toString(), ident, p, epsilon); - mv = pmv.getMvMat(); + mv = pmv.getMv(); MiscUtils.assertMatrix4fEquals("Mv not translated123, "+pmv.toString(), translated123C, mv, epsilon); - mvi = pmv.getMviMat(); + mvi = pmv.getMvi(); MiscUtils.assertMatrix4fEquals("Mvi not translated123, "+pmv.toString(), translated123I, mvi, epsilon); Assert.assertEquals(0, pmv.getDirtyBits()); Assert.assertEquals(false, pmv.isReqDirty()); Assert.assertNotNull(pmv.getFrustum()); // FIXME: Test Frustum value! - Assert.assertNotNull(pmv.getPMvMat()); // FIXME: Test value! - Assert.assertNotNull(pmv.getPMviMat()); // FIXME: Test value! + Assert.assertNotNull(pmv.getPMv()); // FIXME: Test value! + Assert.assertNotNull(pmv.getPMvi()); // FIXME: Test value! Assert.assertEquals(0, pmv.getDirtyBits()); Assert.assertEquals(false, pmv.isReqDirty()); // System.err.println("P3: "+pmv.toString()); - mvit = pmv.getMvitMat(); + mvit = pmv.getMvit(); MiscUtils.assertMatrix4fEquals("Mvit not translated123, "+pmv.toString()+pmv.toString(), translated123IT, mvit, epsilon); Assert.assertEquals(0, pmv.getDirtyBits()); Assert.assertEquals(false, pmv.isReqDirty()); @@ -302,7 +303,7 @@ public class TestPMVMatrix01NEWT extends UITestCase { Assert.assertTrue("Modified bits zero", 0 != pmv.getModifiedBits(true)); // clear & test Assert.assertTrue(0 != pmv.getDirtyBits()); Assert.assertEquals(true, pmv.isReqDirty()); - Assert.assertEquals(PMVMatrix.INVERSE_MODELVIEW | PMVMatrix.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals(PMVMatrix4f.INVERSE_MODELVIEW | PMVMatrix4f.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); System.err.println("test01b.P2: "+pmv.toString()); MiscUtils.assertMatrix4fEquals("P not identity, "+pmv.toString(), ident, p, epsilon); MiscUtils.assertMatrix4fEquals("Mv not identity, "+pmv.toString(), ident, mv, epsilon); @@ -314,14 +315,14 @@ public class TestPMVMatrix01NEWT extends UITestCase { Assert.assertEquals(true, pmv.update()); Assert.assertTrue(0 != pmv.getDirtyBits()); Assert.assertEquals(false, pmv.isReqDirty()); - Assert.assertEquals(PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals(PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); MiscUtils.assertMatrix4fEquals("Mvi not identity after update, "+pmv.toString(), ident, mvi, epsilon); MiscUtils.assertMatrix4fEquals("Mvit not identity after update, "+pmv.toString(), ident, mvit, epsilon); Assert.assertNotNull(pmv.getFrustum()); // FIXME: Test Frustum value! - Assert.assertNotNull(pmv.getPMvMat()); // FIXME: Test value! - Assert.assertNotNull(pmv.getPMviMat()); // FIXME: Test value! + Assert.assertNotNull(pmv.getPMv()); // FIXME: Test value! + Assert.assertNotNull(pmv.getPMvi()); // FIXME: Test value! Assert.assertEquals(0, pmv.getDirtyBits()); Assert.assertEquals(false, pmv.isReqDirty()); System.err.println("test01b.PX: "+pmv.toString()); @@ -336,13 +337,13 @@ public class TestPMVMatrix01NEWT extends UITestCase { @Test public void test02MviUpdateShaderAccess() { final Matrix4f p, mv, mvi, mvit; - final PMVMatrix pmv = new PMVMatrix(PMVMatrix.INVERSE_MODELVIEW | PMVMatrix.INVERSE_TRANSPOSED_MODELVIEW); + final PMVMatrix pmv = new PMVMatrix(PMVMatrix4f.INVERSE_MODELVIEW | PMVMatrix4f.INVERSE_TRANSPOSED_MODELVIEW); // System.err.println("P0: "+pmv.toString()); - Assert.assertEquals(PMVMatrix.INVERSE_MODELVIEW | PMVMatrix.INVERSE_TRANSPOSED_MODELVIEW, pmv.getReqBits()); + Assert.assertEquals(PMVMatrix4f.INVERSE_MODELVIEW | PMVMatrix4f.INVERSE_TRANSPOSED_MODELVIEW, pmv.getReqBits()); Assert.assertTrue(0 != pmv.getDirtyBits()); Assert.assertEquals(true, pmv.isReqDirty()); - Assert.assertEquals(PMVMatrix.INVERSE_MODELVIEW | PMVMatrix.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals(PMVMatrix4f.INVERSE_MODELVIEW | PMVMatrix4f.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); // // Action #0 @@ -351,7 +352,7 @@ public class TestPMVMatrix01NEWT extends UITestCase { { pmv.glMatrixMode(GLMatrixFunc.GL_PROJECTION); pmv.glLoadIdentity(); - ident = pmv.getPMat(); + ident = pmv.getP(); pmv.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); pmv.glLoadIdentity(); @@ -359,14 +360,14 @@ public class TestPMVMatrix01NEWT extends UITestCase { // System.err.println("P0: "+pmv.toString()); Assert.assertTrue("Modified bits zero", 0 != pmv.getModifiedBits(true)); // clear & test - Assert.assertEquals(PMVMatrix.INVERSE_MODELVIEW | PMVMatrix.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals(PMVMatrix4f.INVERSE_MODELVIEW | PMVMatrix4f.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); Assert.assertEquals(true, pmv.isReqDirty()); Assert.assertEquals(true, pmv.update()); - Assert.assertEquals(PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals(PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); Assert.assertEquals(false, pmv.isReqDirty()); Assert.assertNotNull(pmv.getFrustum()); // FIXME: Test Frustum value! - Assert.assertNotNull(pmv.getPMvMat()); // FIXME: Test value! - Assert.assertNotNull(pmv.getPMviMat()); // FIXME: Test value! + Assert.assertNotNull(pmv.getPMv()); // FIXME: Test value! + Assert.assertNotNull(pmv.getPMvi()); // FIXME: Test value! Assert.assertEquals(0, pmv.getDirtyBits()); Assert.assertEquals(false, pmv.isReqDirty()); // System.err.println("P1: "+pmv.toString()); @@ -374,19 +375,19 @@ public class TestPMVMatrix01NEWT extends UITestCase { // // Get // - p = pmv.getPMat(); + p = pmv.getP(); MiscUtils.assertMatrix4fEquals("P not identity, "+pmv.toString(), ident, p, epsilon); - mv = pmv.getMvMat(); + mv = pmv.getMv(); MiscUtils.assertMatrix4fEquals("Mv not identity, "+pmv.toString(), ident, mv, epsilon); Assert.assertEquals(0, pmv.getDirtyBits()); Assert.assertEquals(false, pmv.isReqDirty()); - mvi = pmv.getMviMat(); + mvi = pmv.getMvi(); MiscUtils.assertMatrix4fEquals("Mvi not identity, "+pmv.toString(), ident, mvi, epsilon); Assert.assertEquals(0, pmv.getDirtyBits()); Assert.assertEquals(false, pmv.isReqDirty()); - mvit = pmv.getMvitMat(); + mvit = pmv.getMvit(); MiscUtils.assertMatrix4fEquals("Mvi not identity, "+pmv.toString(), ident, mvit, epsilon); Assert.assertEquals(0, pmv.getDirtyBits()); Assert.assertEquals(false, pmv.isReqDirty()); @@ -397,7 +398,7 @@ public class TestPMVMatrix01NEWT extends UITestCase { pmv.glTranslatef(1f, 2f, 3f); // all dirty ! Assert.assertTrue("Modified bits zero", 0 != pmv.getModifiedBits(true)); // clear & test Assert.assertTrue("Dirty bits clean, "+pmv.toString(), 0 != pmv.getDirtyBits()); - Assert.assertEquals("Remaining dirty bits not Mvi|Mvit|Frustum, "+pmv.toString(), PMVMatrix.INVERSE_MODELVIEW|PMVMatrix.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals("Remaining dirty bits not Mvi|Mvit|Frustum, "+pmv.toString(), PMVMatrix4f.INVERSE_MODELVIEW|PMVMatrix4f.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); MiscUtils.assertMatrix4fEquals("P not identity, "+pmv.toString()+pmv.toString(), ident, p, epsilon); MiscUtils.assertMatrix4fEquals("Mv not translated123, "+pmv.toString()+pmv.toString(), translated123C, mv, epsilon); MiscUtils.assertMatrix4fNotEqual("Mvi already translated123 w/o update, "+pmv.toString()+pmv.toString(), translated123I, mvi, epsilon); @@ -405,14 +406,14 @@ public class TestPMVMatrix01NEWT extends UITestCase { MiscUtils.assertMatrix4fEquals("Mvi not identity, "+pmv.toString()+pmv.toString(), ident, mvi, epsilon); MiscUtils.assertMatrix4fEquals("Mvit not identity, "+pmv.toString()+pmv.toString(), ident, mvit, epsilon); - Assert.assertEquals(PMVMatrix.INVERSE_MODELVIEW | PMVMatrix.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals(PMVMatrix4f.INVERSE_MODELVIEW | PMVMatrix4f.INVERSE_TRANSPOSED_MODELVIEW | PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); Assert.assertEquals(true, pmv.isReqDirty()); Assert.assertEquals(true, pmv.update()); // will clean dirty bits, since all requests has been made -> true - Assert.assertEquals(PMVMatrix.MANUAL_BITS, pmv.getDirtyBits()); + Assert.assertEquals(PMVMatrix4f.MANUAL_BITS, pmv.getDirtyBits()); Assert.assertEquals(false, pmv.isReqDirty()); Assert.assertNotNull(pmv.getFrustum()); // FIXME: Test Frustum value! - Assert.assertNotNull(pmv.getPMvMat()); // FIXME: Test value! - Assert.assertNotNull(pmv.getPMviMat()); // FIXME: Test value! + Assert.assertNotNull(pmv.getPMv()); // FIXME: Test value! + Assert.assertNotNull(pmv.getPMvi()); // FIXME: Test value! Assert.assertEquals(0, pmv.getDirtyBits()); Assert.assertEquals(false, pmv.isReqDirty()); MiscUtils.assertMatrix4fEquals("Mvi not translated123, "+pmv.toString()+pmv.toString(), translated123I, mvi, epsilon); @@ -432,7 +433,7 @@ public class TestPMVMatrix01NEWT extends UITestCase { pmv.glLoadIdentity(); pmv.glTranslatef(5f, 6f, 7f); - pmvMv.load(pmv.getMvMat()); + pmvMv.load(pmv.getMv()); // pmvMvi = pmv.glGetMviMatrixf(); // pmvMvit = pmv.glGetMvitMatrixf(); } @@ -473,7 +474,7 @@ public class TestPMVMatrix01NEWT extends UITestCase { pmv.glTranslatef(5f, 6f, 7f); pmv.glRotatef(90f, 1f, 0f, 0f); - pmvMv.load(pmv.getMvMat()); + pmvMv.load(pmv.getMv()); // pmvMvi = pmv.glGetMviMatrixf(); // pmvMvit = pmv.glGetMvitMatrixf(); } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestPMVMatrix02NOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestPMVMatrix02NOUI.java index 391973215..b03feed56 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestPMVMatrix02NOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestPMVMatrix02NOUI.java @@ -26,7 +26,7 @@ * or implied, of JogAmp Community.
*/
-package com.jogamp.opengl.test.junit.jogl.math;
+package com.jogamp.opengl.test.junit.math;
import org.junit.Before;
import org.junit.Test; @@ -35,9 +35,9 @@ import org.junit.runners.MethodSorters; import com.jogamp.opengl.util.PMVMatrix;
import com.jogamp.junit.util.JunitTracer;
+import com.jogamp.math.Matrix4f;
+import com.jogamp.math.Vec3f;
import com.jogamp.opengl.fixedfunc.GLMatrixFunc;
-import com.jogamp.opengl.math.Matrix4f;
-import com.jogamp.opengl.math.Vec3f;
import static org.junit.Assert.assertEquals;
@@ -63,7 +63,7 @@ public class TestPMVMatrix02NOUI extends JunitTracer { new Vec3f(0, 0, -1),
new Vec3f(0, 1, 0)
);
- final Matrix4f mvMatrix = fMat.getMvMat();
+ final Matrix4f mvMatrix = fMat.getMv();
assertEquals(
/**
* The 3 rows of the matrix (= the 3 columns of the array/buffer) should be: side, up, -forward.
@@ -86,7 +86,7 @@ public class TestPMVMatrix02NOUI extends JunitTracer { new Vec3f(0, 1, 0),
new Vec3f(0, 0, 1)
);
- final Matrix4f mvMatrix = fMat.getMvMat();
+ final Matrix4f mvMatrix = fMat.getMv();
assertEquals(
/**
* The 3 rows of the matrix (= the 3 columns of the array/buffer) should be: side, up, -forward.
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestPMVMatrix03NOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestPMVMatrix03NOUI.java index e6697d356..78f017f60 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestPMVMatrix03NOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestPMVMatrix03NOUI.java @@ -1,16 +1,16 @@ -package com.jogamp.opengl.test.junit.jogl.math; +package com.jogamp.opengl.test.junit.math; import java.util.Arrays; import com.jogamp.junit.util.JunitTracer; +import com.jogamp.math.FloatUtil; +import com.jogamp.math.Matrix4f; +import com.jogamp.math.Recti; +import com.jogamp.math.Vec3f; import com.jogamp.opengl.fixedfunc.GLMatrixFunc; import jogamp.opengl.ProjectFloat; -import com.jogamp.opengl.math.FloatUtil; -import com.jogamp.opengl.math.Matrix4f; -import com.jogamp.opengl.math.Recti; -import com.jogamp.opengl.math.Vec3f; import com.jogamp.opengl.util.PMVMatrix; import org.junit.Assert; @@ -40,15 +40,15 @@ public class TestPMVMatrix03NOUI extends JunitTracer { final PMVMatrix m = new PMVMatrix(); final Matrix4f mat4PMv = new Matrix4f(); - m.mulPMvMat(mat4PMv); + m.getMulPMv(mat4PMv); System.err.println(mat4PMv.toString(null, "mat4PMv", "%10.5f")); - m.gluProject(new Vec3f(1f, 0f, 0f), viewport, winA00); + m.mapObjToWin(new Vec3f(1f, 0f, 0f), viewport, winA00); System.err.println("A.0.0 - Project 1,0 -->" + winA00); Matrix4f.mapObjToWin(new Vec3f(1f, 0f, 0f), mat4PMv, viewport, winB00); // single PMv System.err.println("B.0.0 - Project 1,0 -->" + winB00); - m.gluProject(new Vec3f(0f, 0f, 0f), viewport, winA01); + m.mapObjToWin(new Vec3f(0f, 0f, 0f), viewport, winA01); System.err.println("A.0.1 - Project 0,0 -->" + winA01); Matrix4f.mapObjToWin(new Vec3f(0f, 0f, 0f), mat4PMv, viewport, winB01); // single PMv System.err.println("B.0.1 - Project 0,0 -->" + winB01); @@ -57,15 +57,15 @@ public class TestPMVMatrix03NOUI extends JunitTracer { m.glOrthof(0, 10, 0, 10, 1, -1); System.err.println("MATRIX - Ortho 0,0,10,10 - Locate the origin in the bottom left and scale"); System.err.println(m); - m.mulPMvMat(mat4PMv); + m.getMulPMv(mat4PMv); System.err.println(mat4PMv.toString(null, "mat4PMv", "%10.5f")); - m.gluProject(new Vec3f(1f, 0f, 0f), viewport, winA10); + m.mapObjToWin(new Vec3f(1f, 0f, 0f), viewport, winA10); System.err.println("A.1.0 - Project 1,0 -->" +winA10); Matrix4f.mapObjToWin(new Vec3f(1f, 0f, 0f), mat4PMv, viewport, winB10); // single PMv System.err.println("B.1.0 - Project 1,0 -->" +winB10); - m.gluProject(new Vec3f(0f, 0f, 0f), viewport, winA11); + m.mapObjToWin(new Vec3f(0f, 0f, 0f), viewport, winA11); System.err.println("A.1.1 - Project 0,0 -->" +winA11); Matrix4f.mapObjToWin(new Vec3f(0f, 0f, 0f), mat4PMv, viewport, winB11); // single PMv System.err.println("B.1.1 - Project 0,0 -->" +winB11); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestPMVTransform01NOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestPMVTransform01NOUI.java index d2f0fc794..f92394fa8 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestPMVTransform01NOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestPMVTransform01NOUI.java @@ -25,12 +25,11 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of JogAmp Community. */ -package com.jogamp.opengl.test.junit.jogl.math; +package com.jogamp.opengl.test.junit.math; import com.jogamp.junit.util.JunitTracer; - -import com.jogamp.opengl.math.Matrix4f; -import com.jogamp.opengl.math.Vec3f; +import com.jogamp.math.Matrix4f; +import com.jogamp.math.Vec3f; import com.jogamp.opengl.test.junit.util.MiscUtils; import com.jogamp.opengl.util.PMVMatrix; @@ -64,7 +63,7 @@ public class TestPMVTransform01NOUI extends JunitTracer { 1.00000f, 2.00000f, 3.00000f, 1.00000f, }); final Matrix4f has = new Matrix4f(); - pmv.mulPMvMat(has); + pmv.getMulPMv(has); MiscUtils.assertMatrix4fEquals(exp, has, epsilon); Assert.assertEquals(exp, has); } @@ -89,7 +88,7 @@ public class TestPMVTransform01NOUI extends JunitTracer { 2.00000f, 4.00000f, 6.00000f, 1.00000f, }); final Matrix4f has = new Matrix4f(); - pmv.mulPMvMat(has); + pmv.getMulPMv(has); MiscUtils.assertMatrix4fEquals(exp, has, epsilon); Assert.assertEquals(exp, has); } diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestQuaternion01NOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestQuaternion01NOUI.java index 8c6191c75..8e4957d97 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestQuaternion01NOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestQuaternion01NOUI.java @@ -26,7 +26,7 @@ * or implied, of JogAmp Community.
*/
-package com.jogamp.opengl.test.junit.jogl.math;
+package com.jogamp.opengl.test.junit.math;
import org.junit.Assert;
import org.junit.Test; @@ -34,12 +34,12 @@ import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters;
import com.jogamp.junit.util.JunitTracer;
-import com.jogamp.opengl.math.FloatUtil;
-import com.jogamp.opengl.math.Matrix4f;
-import com.jogamp.opengl.math.Quaternion;
-import com.jogamp.opengl.math.Vec3f;
-import com.jogamp.opengl.math.Vec4f;
-import com.jogamp.opengl.math.VectorUtil;
+import com.jogamp.math.FloatUtil;
+import com.jogamp.math.Matrix4f;
+import com.jogamp.math.Quaternion;
+import com.jogamp.math.Vec3f;
+import com.jogamp.math.Vec4f;
+import com.jogamp.math.VectorUtil;
@FixMethodOrder(MethodSorters.NAME_ASCENDING) public class TestQuaternion01NOUI extends JunitTracer {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestVec3f01NOUI.java b/src/test/com/jogamp/opengl/test/junit/math/TestVec3f01NOUI.java index fe762926f..b8e9356fb 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/math/TestVec3f01NOUI.java +++ b/src/test/com/jogamp/opengl/test/junit/math/TestVec3f01NOUI.java @@ -26,7 +26,7 @@ * or implied, of JogAmp Community.
*/
-package com.jogamp.opengl.test.junit.jogl.math;
+package com.jogamp.opengl.test.junit.math;
import org.junit.Assert;
import org.junit.Test; @@ -34,9 +34,9 @@ import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters;
import com.jogamp.junit.util.JunitTracer;
-import com.jogamp.opengl.math.FloatUtil;
-import com.jogamp.opengl.math.Quaternion;
-import com.jogamp.opengl.math.Vec3f;
+import com.jogamp.math.FloatUtil;
+import com.jogamp.math.Quaternion;
+import com.jogamp.math.Vec3f;
@FixMethodOrder(MethodSorters.NAME_ASCENDING) public class TestVec3f01NOUI extends JunitTracer {
diff --git a/src/test/com/jogamp/opengl/test/junit/util/MiscUtils.java b/src/test/com/jogamp/opengl/test/junit/util/MiscUtils.java index d4c60144a..b8c7a84e6 100644 --- a/src/test/com/jogamp/opengl/test/junit/util/MiscUtils.java +++ b/src/test/com/jogamp/opengl/test/junit/util/MiscUtils.java @@ -40,9 +40,9 @@ import java.util.Iterator; import java.util.List; import com.jogamp.opengl.GLContext; -import com.jogamp.opengl.math.Matrix4f; import com.jogamp.common.os.Platform; import com.jogamp.common.util.InterruptSource; +import com.jogamp.math.Matrix4f; public class MiscUtils { public static boolean atob(final String str, final boolean def) { |