From b2c0eb7da61e43441879ae63a28b29b6a00e42be Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Fri, 7 Jun 2024 09:28:33 +0200 Subject: [PATCH] [FEAT] use Maven a build system root tool --- .classpath | 35 +++-- .project | 19 +-- .pydevproject | 5 - lutin_org-atriasoft-ege.py | 2 +- pom.xml | 133 ++++++++++++++++++ .../CollisionTestApplication.java | 8 +- .../atriasoft/ege/collisiontest/Log.java | 14 +- .../ege/lightTest/LightTestApplication.java | 6 +- .../sample/atriasoft/ege/lightTest/Log.java | 14 +- .../src/sample/atriasoft/ege/lowPoly/Log.java | 14 +- .../ege/lowPoly/LowPolyApplication.java | 6 +- .../sample/atriasoft/ege/loxelEngine/Log.java | 14 +- .../loxelEngine/LoxelApplicationPerso.java | 8 +- .../sample/atriasoft/ege/mapFactory/Appl.java | 26 ++-- .../atriasoft/ege/mapFactory/EgeScene.java | 8 +- .../atriasoft/ege/mapFactory/MainWindows.java | 2 +- .../ege/mapFactory/tools/ToolMapHeight.java | 14 +- .../atriasoft/ege/s1_texturedCube/Log.java | 14 +- .../ege/s1_texturedCube/S1Application.java | 18 +-- .../atriasoft/ege/ControlCameraPlayer.java | 14 +- .../atriasoft/ege/ControlCameraPlayerFPS.java | 6 +- src/org/atriasoft/ege/Entity.java | 18 +-- src/org/atriasoft/ege/Environement.java | 24 ++-- .../ege/components/ComponentLight.java | 2 +- .../ege/components/ComponentPhysics.java | 24 ++-- .../ege/components/ComponentStaticMeshs.java | 2 +- .../ege/components/ComponentTexture.java | 2 +- .../components/ComponentTexturePalette.java | 4 +- .../ege/components/ComponentTextures.java | 2 +- .../ege/components/part/LightRender.java | 2 +- src/org/atriasoft/ege/engines/EngineAI.java | 2 +- .../ege/engines/EngineDynamicMeshs.java | 4 +- .../atriasoft/ege/engines/EngineLight.java | 8 +- src/org/atriasoft/ege/engines/EngineMap.java | 2 +- .../atriasoft/ege/engines/EnginePhysics.java | 6 +- .../atriasoft/ege/engines/EngineRender.java | 14 +- .../map/ComponentDynamicMeshsVoxelMap.java | 18 +-- src/org/atriasoft/phyligram/PhysicBox.java | 2 +- .../math/ToolCollisionOBBWithOBB.java | 12 +- .../math/ToolCollisionSphereWithSphere.java | 2 +- .../atriasoft/phyligram/shape/Concave.java | 2 +- src/org/atriasoft/phyligram/shape/Shape.java | 2 +- .../phyligram/tree/DynamicAABBTree.java | 26 ++-- test/src/test/atriasoft/ege/TestBasicLog.java | 22 +-- 44 files changed, 348 insertions(+), 234 deletions(-) delete mode 100644 .pydevproject create mode 100644 pom.xml diff --git a/.classpath b/.classpath index fd8a754..3083ca1 100644 --- a/.classpath +++ b/.classpath @@ -1,30 +1,27 @@ - + + - - - - - - - - - - - - - - - - - + + + - + + + + + + + + + + + diff --git a/.project b/.project index ef28fb1..693b95d 100644 --- a/.project +++ b/.project @@ -1,34 +1,23 @@ - atriasoft-ege + ege - atriasoft-ege - org.python.pydev.PyDevBuilder + org.eclipse.jdt.core.javabuilder - org.eclipse.jdt.core.javabuilder + org.eclipse.m2e.core.maven2Builder org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature - - - 1646149232188 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - diff --git a/.pydevproject b/.pydevproject deleted file mode 100644 index 2b04565..0000000 --- a/.pydevproject +++ /dev/null @@ -1,5 +0,0 @@ - - - Default - python interpreter - diff --git a/lutin_org-atriasoft-ege.py b/lutin_org-atriasoft-ege.py index 0afddb7..263fd49 100644 --- a/lutin_org-atriasoft-ege.py +++ b/lutin_org-atriasoft-ege.py @@ -68,7 +68,7 @@ def configure(target, my_module): 'src/org/atriasoft/ege/engines/EngineRender.java', 'src/org/atriasoft/ege/engines/EngineLight.java', 'src/org/atriasoft/ege/ControlCameraPlayerFPS.java', - 'src/org/atriasoft/ege/internal/Log.java', + 'src/org/atriasoft/ege/internal/LOGGER.java', 'src/org/atriasoft/ege/geometry/AABB.java', 'src/org/atriasoft/ege/geometry/Sphere.java', 'src/org/atriasoft/ege/geometry/Ray.java', diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..429d474 --- /dev/null +++ b/pom.xml @@ -0,0 +1,133 @@ + + 4.0.0 + org.atriasoft + ege + 0.1.0 + + 3.13.0 + 21 + 21 + 3.1.1 + + + + + gitea + https://gitea.atria-soft.org/api/packages/org.atriasoft/maven + + + + + gitea + https://gitea.atria-soft.org/api/packages/org.atriasoft/maven + + + gitea + https://gitea.atria-soft.org/api/packages/org.atriasoft/maven + + + + + + org.atriasoft + ewol + 0.1.0 + + + org.atriasoft + ephysics + 0.1.0 + + + org.atriasoft + loader3d + 0.1.0 + + + org.junit.jupiter + junit-jupiter-api + 5.9.3 + test + + + org.slf4j + slf4j-simple + 2.0.7 + test + + + + + src + test/src + ${project.basedir}/out/maven/ + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + ${maven.compiler.source} + ${maven.compiler.target} + + + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M5 + + + maven-assembly-plugin + + + + fully.qualified.MainClass + + + + jar-with-dependencies + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + private + true + + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + public + + + + + + diff --git a/samples/src/sample/atriasoft/ege/collisiontest/CollisionTestApplication.java b/samples/src/sample/atriasoft/ege/collisiontest/CollisionTestApplication.java index 0efdd3e..bccb9bf 100644 --- a/samples/src/sample/atriasoft/ege/collisiontest/CollisionTestApplication.java +++ b/samples/src/sample/atriasoft/ege/collisiontest/CollisionTestApplication.java @@ -186,12 +186,12 @@ public class CollisionTestApplication extends GaleApplication { } // ready to let Gale & Ege manage the display - Log.info("==> Init APPL (END)"); + LOGGER.info("==> Init APPL (END)"); } @Override public void onDraw(final GaleContext context) { - //Log.info("==> appl Draw ..."); + //LOGGER.info("==> appl Draw ..."); final Vector2f size = getSize(); // Store openGl context. OpenGL.push(); @@ -211,7 +211,7 @@ public class CollisionTestApplication extends GaleApplication { OpenGL.clear(OpenGL.ClearFlag.clearFlag_depthBuffer); OpenGL.enable(Flag.flag_depthTest); - //Log.info("==> appl Draw ..."); + //LOGGER.info("==> appl Draw ..."); this.env.render(20, "default"); if (this.debugDrawProperty == null) { this.debugDrawProperty = ResourceColored3DObject.create(); @@ -288,7 +288,7 @@ public class CollisionTestApplication extends GaleApplication { @Override public void onRegenerateDisplay(final GaleContext context) { - //Log.verbose("Regenerate Gale Application"); + //LOGGER.trace("Regenerate Gale Application"); this.angleLight += 0.01; final Vector3f posss = this.lightPosition.getTransform().getPosition().add(new Vector3f(5 + (float) Math.cos(this.angleLight) * 7.0f, 5 + (float) Math.sin(this.angleLight) * 7.0f, 0)); this.lightPosition.setTransform(this.lightPosition.getTransform().withPosition(posss)); diff --git a/samples/src/sample/atriasoft/ege/collisiontest/Log.java b/samples/src/sample/atriasoft/ege/collisiontest/Log.java index 2c8b868..b98d8c3 100644 --- a/samples/src/sample/atriasoft/ege/collisiontest/Log.java +++ b/samples/src/sample/atriasoft/ege/collisiontest/Log.java @@ -4,19 +4,19 @@ public class Log { private static final String LIBNAME = "LoxelEngine"; public static void critical(String data) { - System.out.println("[C] " + Log.LIBNAME + " | " + data); + System.out.println("[C] " + LOGGER.LIBNAME + " | " + data); } public static void debug(String data) { - System.out.println("[D] " + Log.LIBNAME + " | " + data); + System.out.println("[D] " + LOGGER.LIBNAME + " | " + data); } public static void error(String data) { - System.out.println("[E] " + Log.LIBNAME + " | " + data); + System.out.println("[E] " + LOGGER.LIBNAME + " | " + data); } public static void info(String data) { - System.out.println("[I] " + Log.LIBNAME + " | " + data); + System.out.println("[I] " + LOGGER.LIBNAME + " | " + data); } public static void print(String data) { @@ -24,15 +24,15 @@ public class Log { } public static void todo(String data) { - System.out.println("[TODO] " + Log.LIBNAME + " | " + data); + System.out.println("[TODO] " + LOGGER.LIBNAME + " | " + data); } public static void verbose(String data) { - System.out.println("[V] " + Log.LIBNAME + " | " + data); + System.out.println("[V] " + LOGGER.LIBNAME + " | " + data); } public static void warning(String data) { - System.out.println("[W] " + Log.LIBNAME + " | " + data); + System.out.println("[W] " + LOGGER.LIBNAME + " | " + data); } private Log() {} diff --git a/samples/src/sample/atriasoft/ege/lightTest/LightTestApplication.java b/samples/src/sample/atriasoft/ege/lightTest/LightTestApplication.java index 8ad910d..77582e2 100644 --- a/samples/src/sample/atriasoft/ege/lightTest/LightTestApplication.java +++ b/samples/src/sample/atriasoft/ege/lightTest/LightTestApplication.java @@ -119,12 +119,12 @@ public class LightTestApplication extends GaleApplication { this.basicRotation = Quaternion.fromEulerAngles(new Vector3f(0.005f, 0.005f, 0.01f)); this.basicRotation2 = Quaternion.fromEulerAngles(new Vector3f(0.003f, 0.01f, 0.001f)); // ready to let Gale & Ege manage the display - Log.info("==> Init APPL (END)"); + LOGGER.info("==> Init APPL (END)"); } @Override public void onDraw(final GaleContext context) { - //Log.info("==> appl Draw ..."); + //LOGGER.info("==> appl Draw ..."); final Vector2f size = getSize(); // Store openGl context. OpenGL.push(); @@ -161,7 +161,7 @@ public class LightTestApplication extends GaleApplication { @Override public void onRegenerateDisplay(final GaleContext context) { - //Log.verbose("Regenerate Gale Application"); + //LOGGER.trace("Regenerate Gale Application"); //materialCube.setAmbientFactor(new Vector3f(1.0f,1.0f,1.0f)); // apply a little rotation to show the element move //objectPosition.getTransform().applyRotation(basicRotation); diff --git a/samples/src/sample/atriasoft/ege/lightTest/Log.java b/samples/src/sample/atriasoft/ege/lightTest/Log.java index 8ef48f1..23d3db7 100644 --- a/samples/src/sample/atriasoft/ege/lightTest/Log.java +++ b/samples/src/sample/atriasoft/ege/lightTest/Log.java @@ -4,19 +4,19 @@ public class Log { private static final String LIBNAME = "LowPolySample"; public static void critical(String data) { - System.out.println("[C] " + Log.LIBNAME + " | " + data); + System.out.println("[C] " + LOGGER.LIBNAME + " | " + data); } public static void debug(String data) { - System.out.println("[D] " + Log.LIBNAME + " | " + data); + System.out.println("[D] " + LOGGER.LIBNAME + " | " + data); } public static void error(String data) { - System.out.println("[E] " + Log.LIBNAME + " | " + data); + System.out.println("[E] " + LOGGER.LIBNAME + " | " + data); } public static void info(String data) { - System.out.println("[I] " + Log.LIBNAME + " | " + data); + System.out.println("[I] " + LOGGER.LIBNAME + " | " + data); } public static void print(String data) { @@ -24,15 +24,15 @@ public class Log { } public static void todo(String data) { - System.out.println("[TODO] " + Log.LIBNAME + " | " + data); + System.out.println("[TODO] " + LOGGER.LIBNAME + " | " + data); } public static void verbose(String data) { - System.out.println("[V] " + Log.LIBNAME + " | " + data); + System.out.println("[V] " + LOGGER.LIBNAME + " | " + data); } public static void warning(String data) { - System.out.println("[W] " + Log.LIBNAME + " | " + data); + System.out.println("[W] " + LOGGER.LIBNAME + " | " + data); } private Log() {} diff --git a/samples/src/sample/atriasoft/ege/lowPoly/Log.java b/samples/src/sample/atriasoft/ege/lowPoly/Log.java index c0f4a22..9525fce 100644 --- a/samples/src/sample/atriasoft/ege/lowPoly/Log.java +++ b/samples/src/sample/atriasoft/ege/lowPoly/Log.java @@ -4,19 +4,19 @@ public class Log { private static final String LIBNAME = "LowPolySample"; public static void critical(String data) { - System.out.println("[C] " + Log.LIBNAME + " | " + data); + System.out.println("[C] " + LOGGER.LIBNAME + " | " + data); } public static void debug(String data) { - System.out.println("[D] " + Log.LIBNAME + " | " + data); + System.out.println("[D] " + LOGGER.LIBNAME + " | " + data); } public static void error(String data) { - System.out.println("[E] " + Log.LIBNAME + " | " + data); + System.out.println("[E] " + LOGGER.LIBNAME + " | " + data); } public static void info(String data) { - System.out.println("[I] " + Log.LIBNAME + " | " + data); + System.out.println("[I] " + LOGGER.LIBNAME + " | " + data); } public static void print(String data) { @@ -24,15 +24,15 @@ public class Log { } public static void todo(String data) { - System.out.println("[TODO] " + Log.LIBNAME + " | " + data); + System.out.println("[TODO] " + LOGGER.LIBNAME + " | " + data); } public static void verbose(String data) { - System.out.println("[V] " + Log.LIBNAME + " | " + data); + System.out.println("[V] " + LOGGER.LIBNAME + " | " + data); } public static void warning(String data) { - System.out.println("[W] " + Log.LIBNAME + " | " + data); + System.out.println("[W] " + LOGGER.LIBNAME + " | " + data); } private Log() {} diff --git a/samples/src/sample/atriasoft/ege/lowPoly/LowPolyApplication.java b/samples/src/sample/atriasoft/ege/lowPoly/LowPolyApplication.java index 1aee1da..52de270 100644 --- a/samples/src/sample/atriasoft/ege/lowPoly/LowPolyApplication.java +++ b/samples/src/sample/atriasoft/ege/lowPoly/LowPolyApplication.java @@ -132,12 +132,12 @@ public class LowPolyApplication extends GaleApplication { this.basicRotation = Quaternion.fromEulerAngles(new Vector3f(0.005f, 0.005f, 0.01f)); this.basicRotation2 = Quaternion.fromEulerAngles(new Vector3f(0.003f, 0.01f, 0.001f)); // ready to let Gale & Ege manage the display - Log.info("==> Init APPL (END)"); + LOGGER.info("==> Init APPL (END)"); } @Override public void onDraw(final GaleContext context) { - //Log.info("==> appl Draw ..."); + //LOGGER.info("==> appl Draw ..."); final Vector2f size = getSize(); // Store openGl context. OpenGL.push(); @@ -174,7 +174,7 @@ public class LowPolyApplication extends GaleApplication { @Override public void onRegenerateDisplay(final GaleContext context) { - //Log.verbose("Regenerate Gale Application"); + //LOGGER.trace("Regenerate Gale Application"); //materialCube.setAmbientFactor(new Vector3f(1.0f,1.0f,1.0f)); // apply a little rotation to show the element move //objectPosition.getTransform().applyRotation(basicRotation); diff --git a/samples/src/sample/atriasoft/ege/loxelEngine/Log.java b/samples/src/sample/atriasoft/ege/loxelEngine/Log.java index 42f1f4e..e85809f 100644 --- a/samples/src/sample/atriasoft/ege/loxelEngine/Log.java +++ b/samples/src/sample/atriasoft/ege/loxelEngine/Log.java @@ -4,19 +4,19 @@ public class Log { private static final String LIBNAME = "LoxelEnginePerso"; public static void critical(String data) { - System.out.println("[C] " + Log.LIBNAME + " | " + data); + System.out.println("[C] " + LOGGER.LIBNAME + " | " + data); } public static void debug(String data) { - System.out.println("[D] " + Log.LIBNAME + " | " + data); + System.out.println("[D] " + LOGGER.LIBNAME + " | " + data); } public static void error(String data) { - System.out.println("[E] " + Log.LIBNAME + " | " + data); + System.out.println("[E] " + LOGGER.LIBNAME + " | " + data); } public static void info(String data) { - System.out.println("[I] " + Log.LIBNAME + " | " + data); + System.out.println("[I] " + LOGGER.LIBNAME + " | " + data); } public static void print(String data) { @@ -24,15 +24,15 @@ public class Log { } public static void todo(String data) { - System.out.println("[TODO] " + Log.LIBNAME + " | " + data); + System.out.println("[TODO] " + LOGGER.LIBNAME + " | " + data); } public static void verbose(String data) { - System.out.println("[V] " + Log.LIBNAME + " | " + data); + System.out.println("[V] " + LOGGER.LIBNAME + " | " + data); } public static void warning(String data) { - System.out.println("[W] " + Log.LIBNAME + " | " + data); + System.out.println("[W] " + LOGGER.LIBNAME + " | " + data); } private Log() {} diff --git a/samples/src/sample/atriasoft/ege/loxelEngine/LoxelApplicationPerso.java b/samples/src/sample/atriasoft/ege/loxelEngine/LoxelApplicationPerso.java index 27d76f9..20268c6 100644 --- a/samples/src/sample/atriasoft/ege/loxelEngine/LoxelApplicationPerso.java +++ b/samples/src/sample/atriasoft/ege/loxelEngine/LoxelApplicationPerso.java @@ -400,12 +400,12 @@ public class LoxelApplicationPerso extends GaleApplication { this.basicRotation2 = Quaternion.fromEulerAngles(new Vector3f(0.003f, 0.01f, 0.001f)); // ready to let Gale & Ege manage the display - Log.info("==> Init APPL (END)"); + LOGGER.info("==> Init APPL (END)"); } @Override public void onDraw(final GaleContext context) { - //Log.info("==> appl Draw ..."); + //LOGGER.info("==> appl Draw ..."); final Vector2f size = getSize(); // Store openGl context. OpenGL.push(); @@ -424,7 +424,7 @@ public class LoxelApplicationPerso extends GaleApplication { OpenGL.clear(OpenGL.ClearFlag.clearFlag_depthBuffer); OpenGL.enable(Flag.flag_depthTest); - //Log.info("==> appl Draw ..."); + //LOGGER.info("==> appl Draw ..."); this.env.render(20, "default"); if (this.debugDrawProperty == null) { this.debugDrawProperty = ResourceColored3DObject.create(); @@ -500,7 +500,7 @@ public class LoxelApplicationPerso extends GaleApplication { @Override public void onRegenerateDisplay(final GaleContext context) { - //Log.verbose("Regenerate Gale Application"); + //LOGGER.trace("Regenerate Gale Application"); this.angleLight += 0.01; this.lightPosition.setTransform(this.lightPosition.getTransform() .withPosition(new Vector3f(5 + (float) Math.cos(this.angleLight) * 7.0f, 5 + (float) Math.sin(this.angleLight) * 7.0f, this.lightPosition.getTransform().getPosition().z()))); diff --git a/samples/src/sample/atriasoft/ege/mapFactory/Appl.java b/samples/src/sample/atriasoft/ege/mapFactory/Appl.java index 5db4aa9..bc07d64 100644 --- a/samples/src/sample/atriasoft/ege/mapFactory/Appl.java +++ b/samples/src/sample/atriasoft/ege/mapFactory/Appl.java @@ -12,7 +12,7 @@ public class Appl implements EwolApplication { for (int iii = 0; iii < context.getCmd().size(); iii++) { String tmpppp = context.getCmd().get(iii); if (tmpppp == "-h" || tmpppp == "--help") { - Log.print(" -h/--help display this help"); + LOGGER.print(" -h/--help display this help"); System.exit(0); } } @@ -26,44 +26,44 @@ public class Appl implements EwolApplication { @Override public void onCreate(final EwolContext context) { - Log.info("Application onCreate: [BEGIN]"); + LOGGER.info("Application onCreate: [BEGIN]"); localCreate(context); - Log.info("Application onCreate: [ END ]"); + LOGGER.info("Application onCreate: [ END ]"); } @Override public void onDestroy(final EwolContext context) { - Log.info("Application onDestroy: [BEGIN]"); + LOGGER.info("Application onDestroy: [BEGIN]"); - Log.info("Application onDestroy: [ END ]"); + LOGGER.info("Application onDestroy: [ END ]"); } @Override public void onPause(final EwolContext context) { - Log.info("Application onPause: [BEGIN]"); + LOGGER.info("Application onPause: [BEGIN]"); - Log.info("Application onPause: [ END ]"); + LOGGER.info("Application onPause: [ END ]"); } @Override public void onResume(final EwolContext context) { - Log.info("Application onResume: [BEGIN]"); + LOGGER.info("Application onResume: [BEGIN]"); - Log.info("Application onResume: [ END ]"); + LOGGER.info("Application onResume: [ END ]"); } @Override public void onStart(final EwolContext context) { - Log.info("Application onStart: [BEGIN]"); + LOGGER.info("Application onStart: [BEGIN]"); - Log.info("Application onStart: [ END ]"); + LOGGER.info("Application onStart: [ END ]"); } @Override public void onStop(final EwolContext context) { - Log.info("Application onStop: [BEGIN]"); + LOGGER.info("Application onStop: [BEGIN]"); - Log.info("Application onStop: [ END ]"); + LOGGER.info("Application onStop: [ END ]"); } } \ No newline at end of file diff --git a/samples/src/sample/atriasoft/ege/mapFactory/EgeScene.java b/samples/src/sample/atriasoft/ege/mapFactory/EgeScene.java index b2ac952..b58bfae 100644 --- a/samples/src/sample/atriasoft/ege/mapFactory/EgeScene.java +++ b/samples/src/sample/atriasoft/ege/mapFactory/EgeScene.java @@ -27,10 +27,10 @@ public class EgeScene extends Widget { * @param _event Time generic event */ protected static void periodicCall(final EgeScene self, final EventTime event) { - Log.verbose("Periodic call on Entry({});", event); + LOGGER.trace("Periodic call on Entry({});", event); /* if (!self.shape.periodicCall(event)) { - //Log.error("end periodic call"); + //LOGGER.error("end periodic call"); self.periodicConnectionHanble.close(); } */ @@ -83,7 +83,7 @@ public class EgeScene extends Widget { this.minSize = Vector3f.VALUE_128; // verify the min max of the min size ... checkMinSize(); - Log.error("min size = {}", this.minSize); + LOGGER.error("min size = {}", this.minSize); } protected float getAspectRatio() { @@ -137,7 +137,7 @@ public class EgeScene extends Widget { public boolean onEventInput(final EventInput event) { keepFocus(); Vector3f relPos = relativePosition(new Vector3f(event.pos().x(), event.pos().y(), 0)); - //Log.warning("Event on Input ... {} relPos= {}", event, relPos); + //LOGGER.warn("Event on Input ... {} relPos= {}", event, relPos); this.env.onPointer(event.specialKey(), event.type(), event.inputId(), relPos, event.status()); return true; diff --git a/samples/src/sample/atriasoft/ege/mapFactory/MainWindows.java b/samples/src/sample/atriasoft/ege/mapFactory/MainWindows.java index a253c9f..c033257 100644 --- a/samples/src/sample/atriasoft/ege/mapFactory/MainWindows.java +++ b/samples/src/sample/atriasoft/ege/mapFactory/MainWindows.java @@ -15,7 +15,7 @@ public class MainWindows extends Windows { public static void eventButtonTool(final MainWindows self, Boolean value) { //Vector2b state = self.testWidget.getPropertyFill(); //self.testWidget.setPropertyFill(state.withY(!state.y())); - Log.warning("event elements : {}", value); + LOGGER.warn("event elements : {}", value); if (value) { self.scene.setCurrentTool(new ToolMapHeight()); } else { diff --git a/samples/src/sample/atriasoft/ege/mapFactory/tools/ToolMapHeight.java b/samples/src/sample/atriasoft/ege/mapFactory/tools/ToolMapHeight.java index 0b2e60f..ec62116 100644 --- a/samples/src/sample/atriasoft/ege/mapFactory/tools/ToolMapHeight.java +++ b/samples/src/sample/atriasoft/ege/mapFactory/tools/ToolMapHeight.java @@ -20,17 +20,17 @@ import toolbox.Maths; public class ToolMapHeight implements MapToolInterface { protected static void onCallbackMaxChange(final ToolMapHeight self, final float value) { - Log.warning("get new value {}", value); + LOGGER.warn("get new value {}", value); self.onCallbackMax(value); } protected static void onCallbackMinChange(final ToolMapHeight self, final float value) { - Log.warning("get new value {}", value); + LOGGER.warn("get new value {}", value); self.onCallbackMin(value); } protected static void onCallbackWidthChange(final ToolMapHeight self, final float value) { - Log.warning("get new value {}", value); + LOGGER.warn("get new value {}", value); self.onCallbackValue(value); } @@ -136,23 +136,23 @@ public class ToolMapHeight implements MapToolInterface { // max brush if (event.inputId() == 4 && event.status() == KeyStatus.down && (event.specialKey() != null && event.specialKey().getAltLeft() && event.specialKey().getCtrlLeft())) { this.maxBrush = Maths.avg(this.minBrush + 0.1f, this.maxBrush + 0.1f, 128.0f); - Log.warning(" values: {} / {}", this.minBrush, this.maxBrush); + LOGGER.warn(" values: {} / {}", this.minBrush, this.maxBrush); return true; } if (event.inputId() == 5 && event.status() == KeyStatus.down && (event.specialKey() != null && event.specialKey().getAltLeft() && event.specialKey().getCtrlLeft())) { this.maxBrush = Maths.avg(this.minBrush + 0.1f, this.maxBrush - 0.1f, 128.0f); - Log.warning(" values: {} / {}", this.minBrush, this.maxBrush); + LOGGER.warn(" values: {} / {}", this.minBrush, this.maxBrush); return true; } // min brush if (event.inputId() == 4 && event.status() == KeyStatus.down && (event.specialKey() != null && event.specialKey().getAltLeft())) { this.minBrush = Maths.avg(-128.0f, this.minBrush + 0.1f, this.maxBrush - 0.1f); - Log.warning(" values: {} / {}", this.minBrush, this.maxBrush); + LOGGER.warn(" values: {} / {}", this.minBrush, this.maxBrush); return true; } if (event.inputId() == 5 && event.status() == KeyStatus.down && (event.specialKey() != null && event.specialKey().getAltLeft())) { this.minBrush = Maths.avg(-128.0f, this.minBrush - 0.1f, this.maxBrush - 0.1f); - Log.warning(" values: {} / {}", this.minBrush, this.maxBrush); + LOGGER.warn(" values: {} / {}", this.minBrush, this.maxBrush); return true; } // width brush diff --git a/samples/src/sample/atriasoft/ege/s1_texturedCube/Log.java b/samples/src/sample/atriasoft/ege/s1_texturedCube/Log.java index 571260b..bf94159 100644 --- a/samples/src/sample/atriasoft/ege/s1_texturedCube/Log.java +++ b/samples/src/sample/atriasoft/ege/s1_texturedCube/Log.java @@ -4,19 +4,19 @@ public class Log { private static final String LIBNAME = "Sample1"; public static void critical(String data) { - System.out.println("[C] " + Log.LIBNAME + " | " + data); + System.out.println("[C] " + LOGGER.LIBNAME + " | " + data); } public static void debug(String data) { - System.out.println("[D] " + Log.LIBNAME + " | " + data); + System.out.println("[D] " + LOGGER.LIBNAME + " | " + data); } public static void error(String data) { - System.out.println("[E] " + Log.LIBNAME + " | " + data); + System.out.println("[E] " + LOGGER.LIBNAME + " | " + data); } public static void info(String data) { - System.out.println("[I] " + Log.LIBNAME + " | " + data); + System.out.println("[I] " + LOGGER.LIBNAME + " | " + data); } public static void print(String data) { @@ -24,15 +24,15 @@ public class Log { } public static void todo(String data) { - System.out.println("[TODO] " + Log.LIBNAME + " | " + data); + System.out.println("[TODO] " + LOGGER.LIBNAME + " | " + data); } public static void verbose(String data) { - System.out.println("[V] " + Log.LIBNAME + " | " + data); + System.out.println("[V] " + LOGGER.LIBNAME + " | " + data); } public static void warning(String data) { - System.out.println("[W] " + Log.LIBNAME + " | " + data); + System.out.println("[W] " + LOGGER.LIBNAME + " | " + data); } private Log() {} diff --git a/samples/src/sample/atriasoft/ege/s1_texturedCube/S1Application.java b/samples/src/sample/atriasoft/ege/s1_texturedCube/S1Application.java index 38d0a1a..6a502d3 100644 --- a/samples/src/sample/atriasoft/ege/s1_texturedCube/S1Application.java +++ b/samples/src/sample/atriasoft/ege/s1_texturedCube/S1Application.java @@ -40,7 +40,7 @@ public class S1Application extends GaleApplication { @Override public void onCreate(final GaleContext context) { - Log.info("On create .... [BEGIN]"); + LOGGER.info("On create .... [BEGIN]"); this.env = new Environement(); setSize(new Vector2f(800, 600)); setTitle("Low Poly sample"); @@ -73,14 +73,14 @@ public class S1Application extends GaleApplication { this.basicRotation = Quaternion.fromEulerAngles(new Vector3f(0, 0, 0.01f)); this.basicRotation2 = Quaternion.fromEulerAngles(new Vector3f(0.003f, 0.01f, 0.001f)); // ready to let Gale & Ege manage the display - Log.info("==> Init APPL (END)"); - Log.info("On create .... [ END ]"); + LOGGER.info("==> Init APPL (END)"); + LOGGER.info("On create .... [ END ]"); } @Override public void onDraw(final GaleContext context) { - Log.info("On draw .... [BEGIN]"); - //Log.info("==> appl Draw ..."); + LOGGER.info("On draw .... [BEGIN]"); + //LOGGER.info("==> appl Draw ..."); final Vector2f size = getSize(); // Store openGl context. OpenGL.push(); @@ -103,7 +103,7 @@ public class S1Application extends GaleApplication { this.env.render(20, "default"); // Restore context of matrix OpenGL.pop(); - Log.info("On draw .... [ END ]"); + LOGGER.info("On draw .... [ END ]"); } @Override @@ -118,8 +118,8 @@ public class S1Application extends GaleApplication { @Override public void onRegenerateDisplay(final GaleContext context) { - Log.info("On Regenerate Display .... [BEGIN]"); - //Log.verbose("Regenerate Gale Application"); + LOGGER.info("On Regenerate Display .... [BEGIN]"); + //LOGGER.trace("Regenerate Gale Application"); //this.mainView.setPitch((float) Math.PI * -0.25f); this.mainView.setPitch(-0.7f); @@ -143,6 +143,6 @@ public class S1Application extends GaleApplication { this.objectPosition.setTransform(this.objectPosition.getTransform().rotate(this.basicRotation2)); this.env.periodicCall(); markDrawingIsNeeded(); - Log.info("On Regenerate Display .... [ END ]"); + LOGGER.info("On Regenerate Display .... [ END ]"); } } diff --git a/src/org/atriasoft/ege/ControlCameraPlayer.java b/src/org/atriasoft/ege/ControlCameraPlayer.java index 0a14833..4fe5cd5 100644 --- a/src/org/atriasoft/ege/ControlCameraPlayer.java +++ b/src/org/atriasoft/ege/ControlCameraPlayer.java @@ -79,7 +79,7 @@ public class ControlCameraPlayer implements ControlInterface { @Override public boolean onEventInput(final EventInput event, final Vector3f relativePosition) { - // Log.info("{}", event); + // LOGGER.info("{}", event); // TODO Auto-generated method stub if (!this.fpsMode) { if (event.inputId() == 4) { @@ -120,7 +120,7 @@ public class ControlCameraPlayer implements ControlInterface { } /* this.camera.setRoll(this.camera.getRoll() - (float)Math.toRadians(delta.x * this.player.getTurnSpeed())); - Log.info("Change camera: {} {}", this.camera.getYaw(), this.camera.getPitch()); + LOGGER.info("Change camera: {} {}", this.camera.getYaw(), this.camera.getPitch()); if (this.camera.getRoll()>Math.PI) { this.camera.setRoll(this.camera.getRoll()-(float)Math.PI*2.0f); } @@ -141,7 +141,7 @@ public class ControlCameraPlayer implements ControlInterface { } this.playerPosition.setAngles(new Vector3f(0, 0, tmpAngle)); this.camera.setRoll(-playerZAngle); - Log.info("Change camera: {} {}", this.camera.getYaw(), this.camera.getPitch()); + LOGGER.info("Change camera: {} {}", this.camera.getYaw(), this.camera.getPitch()); } } return false; @@ -182,7 +182,7 @@ public class ControlCameraPlayer implements ControlInterface { distance = speed * walkFactor * event.getTimeDeltaCallSecond(); final float dxStraf = (float) (distance * Math.sin((float) Math.PI * 0.5f + playerZAngle)); final float dyStraf = -(float) (distance * Math.cos((float) Math.PI * 0.5f + playerZAngle)); - //Log.error("update position ... {} {}", dx, dy); + //LOGGER.error("update position ... {} {}", dx, dy); Vector3f tmpPos = playerTransform.getPosition(); tmpPos = tmpPos.add(new Vector3f(dx + dxStraf, dy + dyStraf, 0)); playerTransform = playerTransform.withPosition(tmpPos); @@ -190,15 +190,15 @@ public class ControlCameraPlayer implements ControlInterface { this.playerPosition.setTransform(playerTransform); } // here the camera is behind the player, we need to move the camera ... - //Log.info(" pitch: {} {}", Math.toDegrees(this.camera.getPitch()), Math.toDegrees(playerZAngle)); + //LOGGER.info(" pitch: {} {}", Math.toDegrees(this.camera.getPitch()), Math.toDegrees(playerZAngle)); final float horinzontalDistance = (float) (this.distanceFromCenter * Math.sin(this.camera.getPitch())); final float verticalDistance = (float) (this.distanceFromCenter * Math.cos(this.camera.getPitch())); - //Log.info(" distanceFromCenter {}", distanceFromCenter); + //LOGGER.info(" distanceFromCenter {}", distanceFromCenter); final float tmp = -horinzontalDistance; final float theta = (float) Math.PI + playerZAngle;// - (float)Math.PI*0.5f; final float offsetX = (float) (tmp * Math.sin(-theta)); final float offsetY = (float) (tmp * Math.cos(-theta)); - //Log.info(" res=({},{})", offsetX, offsetY); + //LOGGER.info(" res=({},{})", offsetX, offsetY); this.camera.setPosition(new Vector3f(playerTransform.getPosition().x() + offsetX, playerTransform.getPosition().y() + offsetY, playerTransform.getPosition().z() + 1.6f + verticalDistance)); } diff --git a/src/org/atriasoft/ege/ControlCameraPlayerFPS.java b/src/org/atriasoft/ege/ControlCameraPlayerFPS.java index 8c3fe6f..1146c61 100644 --- a/src/org/atriasoft/ege/ControlCameraPlayerFPS.java +++ b/src/org/atriasoft/ege/ControlCameraPlayerFPS.java @@ -59,7 +59,7 @@ public class ControlCameraPlayerFPS implements ControlInterface { @Override public boolean onEventInput(final EventInput event, final Vector3f relativePosition) { - // Log.info("{}", event); + // LOGGER.info("{}", event); // in grabbing mouse only: if (!Gale.getContext().isGrabPointerEvents()) { return false; @@ -76,7 +76,7 @@ public class ControlCameraPlayerFPS implements ControlInterface { this.camera.setPitch((float) -Math.PI); } this.camera.setRoll(this.camera.getRoll() - (float) Math.toRadians(delta.x() * this.player.getTurnSpeed())); - Log.info("Change camera: {} {}", this.camera.getYaw(), this.camera.getPitch()); + LOGGER.info("Change camera: {} {}", this.camera.getYaw(), this.camera.getPitch()); if (this.camera.getRoll() > Math.PI) { this.camera.setRoll(this.camera.getRoll() - (float) Math.PI * 2.0f); } @@ -112,7 +112,7 @@ public class ControlCameraPlayerFPS implements ControlInterface { distance = speed * event.getTimeDeltaCallSecond(); float dxStraf = (float) (distance * Math.sin((float) Math.PI * 0.5f + this.playerPosition.getAngles().z())); float dyStraf = (float) (distance * Math.cos((float) Math.PI * 0.5f + this.playerPosition.getAngles().z())); - //Log.error("update position ... {} {}", dx, dy); + //LOGGER.error("update position ... {} {}", dx, dy); this.playerPosition.setTransform(this.playerPosition.getTransform().withPosition(this.playerPosition.getTransform().getPosition().add(dx + dxStraf, dy + dyStraf, 0))); this.camera.setPosition(this.playerPosition.getTransform().getPosition()); } diff --git a/src/org/atriasoft/ege/Entity.java b/src/org/atriasoft/ege/Entity.java index 9efb541..816ad55 100644 --- a/src/org/atriasoft/ege/Entity.java +++ b/src/org/atriasoft/ege/Entity.java @@ -29,19 +29,19 @@ public class Entity { public void addComponent(final Component ref) { if (ref == null) { - Log.error("try to add an empty component"); + LOGGER.error("try to add an empty component"); return; } // Remove component with the same name. this.removeComponent(ref.getType()); - Log.print("Entity: Add New component ... [START]"); + LOGGER.print("Entity: Add New component ... [START]"); this.component.add(ref); this.env.engineComponentAdd(ref); for (final Component it : this.component) { ref.addFriendComponent(it); it.addFriendComponent(ref); } - Log.print("Entity: Add New component ... [END]"); + LOGGER.print("Entity: Add New component ... [END]"); } /** @@ -150,7 +150,7 @@ public class Entity { * @return true, the Entity is corectly initialized. */ public boolean init() { - Log.warning("init() not implemented: uId={}", this.uID); + LOGGER.warn("init() not implemented: uId={}", this.uID); return false; }; @@ -198,7 +198,7 @@ public class Entity { // } public boolean init(final Object description) { - Log.warning("init(Object) not implemented: uId={}", this.uID); + LOGGER.warn("init(Object) not implemented: uId={}", this.uID); return false; } @@ -230,11 +230,11 @@ public class Entity { public void removeComponent(final Component ref) { if (ref == null) { - Log.error("try to remove an empty component"); + LOGGER.error("try to remove an empty component"); return; } if (this.component.remove(ref) == false) { - Log.error("try to remove an unexisting component"); + LOGGER.error("try to remove an unexisting component"); return; } this.env.engineComponentRemove(ref); @@ -256,7 +256,7 @@ public class Entity { } } if (findIt == false) { - //Log.error("try to remove an unknown component type : '{}'", type); + //LOGGER.error("try to remove an unknown component type : '{}'", type); return; } this.env.engineComponentRemove(componentRemoved); @@ -277,7 +277,7 @@ public class Entity { this.life += power; this.life = Math.min(Math.max(0.0f, this.life), this.lifeMax); if (this.life <= 0) { - Log.debug("[{}] Entity is killed ...", getUID()); + LOGGER.debug("[{}] Entity is killed ...", getUID()); } if (this.life != previousLife) { onLifeChange(); diff --git a/src/org/atriasoft/ege/Environement.java b/src/org/atriasoft/ege/Environement.java index 70f9fc9..eb73ddd 100644 --- a/src/org/atriasoft/ege/Environement.java +++ b/src/org/atriasoft/ege/Environement.java @@ -39,12 +39,12 @@ public class Environement { */ public static void addCreator(final String type, final CreatorEntity creator) { if (creator == null) { - Log.error("Try to add an empty CREATOR ..."); + LOGGER.error("Try to add an empty CREATOR ..."); return; } - Log.debug("Add creator: {}", type); + LOGGER.debug("Add creator: {}", type); creators.put(type, creator); - Log.debug("Add creator: {} (done)", type); + LOGGER.debug("Add creator: {} (done)", type); } @@ -93,7 +93,7 @@ public class Environement { public void addEngine(final Engine ref) { if (ref == null) { - Log.error("try to add an empty Engine"); + LOGGER.error("try to add an empty Engine"); return; } // check if not exist @@ -144,17 +144,17 @@ public class Environement { */ public Entity createEntity(final String type, final Object value, final boolean autoAddEntity) { if (creators.containsKey(type) == false) { - Log.error("Request creating of an type that is not known '{}'", type); + LOGGER.error("Request creating of an type that is not known '{}'", type); return null; } final CreatorEntity creatorPointer = creators.get(type); if (creatorPointer == null) { - Log.error("null pointer creator == > internal error... '{}'", type); + LOGGER.error("null pointer creator == > internal error... '{}'", type); return null; } final Entity tmpEntity = creatorPointer.create(this, value); if (tmpEntity == null) { - Log.error("allocation error ''{}'", type); + LOGGER.error("allocation error ''{}'", type); return null; } if (autoAddEntity == true) { @@ -298,7 +298,7 @@ public class Environement { return it; } } - Log.error("try to get an unexisting engine type: ''{}'", type); + LOGGER.error("try to get an unexisting engine type: ''{}'", type); return null; } @@ -355,23 +355,23 @@ public class Environement { } public void render(final long deltaMilli, final String cameraName) { - //Log.error("Render: {} time: {}", cameraName, deltaMilli); + //LOGGER.error("Render: {} time: {}", cameraName, deltaMilli); // get the correct camera: final Camera camera = getCamera(cameraName); if (camera == null) { - Log.error("Render: Can not get camera named: '{}'", cameraName); + LOGGER.error("Render: Can not get camera named: '{}'", cameraName); return; } OpenGL.setCameraMatrix(camera.getConvertionMatrix()); for (final Engine it : this.engines) { - //Log.verbose(" render: {}", it.getType()); + //LOGGER.trace(" render: {}", it.getType()); it.render(deltaMilli, camera); } // for (Engine it: engine) { // if(it == null) { // continue; // } - // Log.verbose(" render: {}", it.getType()); + // LOGGER.trace(" render: {}", it.getType()); // it.renderDebug(deltaMilli, camera); // } diff --git a/src/org/atriasoft/ege/components/ComponentLight.java b/src/org/atriasoft/ege/components/ComponentLight.java index e19cd87..67d4f04 100644 --- a/src/org/atriasoft/ege/components/ComponentLight.java +++ b/src/org/atriasoft/ege/components/ComponentLight.java @@ -25,7 +25,7 @@ public class ComponentLight extends Component { if (component instanceof PositionningInterface tmp) { this.position = tmp; } else { - Log.error("component: {} is not an instance of {}", component.getClass().getCanonicalName(), PositionningInterface.class.getCanonicalName()); + LOGGER.error("component: {} is not an instance of {}", component.getClass().getCanonicalName(), PositionningInterface.class.getCanonicalName()); } } } diff --git a/src/org/atriasoft/ege/components/ComponentPhysics.java b/src/org/atriasoft/ege/components/ComponentPhysics.java index 67c3b39..674e8f2 100644 --- a/src/org/atriasoft/ege/components/ComponentPhysics.java +++ b/src/org/atriasoft/ege/components/ComponentPhysics.java @@ -70,7 +70,7 @@ public class ComponentPhysics extends Component { if (component instanceof ComponentPosition tmp) { this.position = tmp; } else { - Log.error("Not manage position model..."); + LOGGER.error("Not manage position model..."); } } } @@ -134,7 +134,7 @@ public class ComponentPhysics extends Component { gravityAcceleration = new Vector3f(0, 0, 0); } // apply this force on the Object - Log.info("apply gravity: {}", gravityAcceleration); + LOGGER.info("apply gravity: {}", gravityAcceleration); // relative to the object Vector3f staticForce = this.staticForce; float globalMass = 0; @@ -156,8 +156,8 @@ public class ComponentPhysics extends Component { this.acceleration = gravityAcceleration.add(globalForce); this.speed = this.speed.add(this.acceleration.multiply(timeStep)); limitWithMaxSpeed(); - Log.info("apply acceleration: {}", this.acceleration); - Log.info("apply speed: {}", this.speed); + LOGGER.info("apply acceleration: {}", this.acceleration); + LOGGER.info("apply speed: {}", this.speed); this.position.setTransform(this.position.getTransform().withPosition(this.position.getTransform().getPosition().add(this.speed))); } @@ -225,7 +225,7 @@ public class ComponentPhysics extends Component { } else if (shape instanceof PhysicMapVoxel shape222) { } else { - Log.error("Not manage collision model... {}", shape); + LOGGER.error("Not manage collision model... {}", shape); } } } else if (shapeCurrent instanceof PhysicSphere shape111) { @@ -254,7 +254,7 @@ public class ComponentPhysics extends Component { } else if (shape instanceof PhysicMapVoxel shape222) { } else { - Log.error("Not manage collision model... {}", shape); + LOGGER.error("Not manage collision model... {}", shape); } } } else if (shapeCurrent instanceof PhysicMapVoxel shape111) { @@ -266,11 +266,11 @@ public class ComponentPhysics extends Component { } else if (shape instanceof PhysicMapVoxel shape222) { } else { - Log.error("Not manage collision model... {}", shape); + LOGGER.error("Not manage collision model... {}", shape); } } } else { - Log.error("Not manage collision model... {}", shapeCurrent); + LOGGER.error("Not manage collision model... {}", shapeCurrent); } return false; } @@ -355,7 +355,7 @@ public class ComponentPhysics extends Component { } else if (shapeRemote instanceof PhysicTriangle) { // nothing can happens ... } else { - Log.error("Not manage collision model... {}", shapeRemote); + LOGGER.error("Not manage collision model... {}", shapeRemote); } return out; } @@ -441,7 +441,7 @@ public class ComponentPhysics extends Component { debugDrawProperty.drawCubeLine(this.aabb.getMin(), this.aabb.getMax(), displayColor, Matrix4f.IDENTITY, true, true); //debugDrawProperty.drawCubeLine(new Vector3f(0,0,0), new Vector3f(32,32,32), new Color(1,0,1,1), Matrix4f.identity(), true, true); } else { - Log.error("no AABB"); + LOGGER.error("no AABB"); } for (PhysicShape shape : this.shapes) { @@ -465,7 +465,7 @@ public class ComponentPhysics extends Component { public void updateAABB() { if (this.position == null) { - Log.info("No position in Entity "); + LOGGER.info("No position in Entity "); return; } // TODO Add a flag to check if it is needed to update the AABB... @@ -482,7 +482,7 @@ public class ComponentPhysics extends Component { return; } if (this.position == null) { - Log.info("No position in Entity "); + LOGGER.info("No position in Entity "); return; } for (PhysicShape shape : this.shapes) { diff --git a/src/org/atriasoft/ege/components/ComponentStaticMeshs.java b/src/org/atriasoft/ege/components/ComponentStaticMeshs.java index 700e83f..b5f457a 100644 --- a/src/org/atriasoft/ege/components/ComponentStaticMeshs.java +++ b/src/org/atriasoft/ege/components/ComponentStaticMeshs.java @@ -19,7 +19,7 @@ public class ComponentStaticMeshs extends Component { public ComponentStaticMeshs(Uri meshUrl) { // TODO load Mesh - Log.critical("Can not Load the Mesh for now ... {}", meshUrl); + LOGGER.critical("Can not Load the Mesh for now ... {}", meshUrl); final ResourceStaticMeshObj mesh = ResourceStaticMeshObj.create(meshUrl); setMesh("default", mesh); } diff --git a/src/org/atriasoft/ege/components/ComponentTexture.java b/src/org/atriasoft/ege/components/ComponentTexture.java index 7067f08..e70e2e3 100644 --- a/src/org/atriasoft/ege/components/ComponentTexture.java +++ b/src/org/atriasoft/ege/components/ComponentTexture.java @@ -12,7 +12,7 @@ public class ComponentTexture extends Component { public ComponentTexture(Uri textureName) { this.texture = ResourceTexture.createFromPng(textureName); if (this.texture == null) { - Log.error("can not instanciate Texture ..."); + LOGGER.error("can not instanciate Texture ..."); } } diff --git a/src/org/atriasoft/ege/components/ComponentTexturePalette.java b/src/org/atriasoft/ege/components/ComponentTexturePalette.java index a9dd74b..610ec7d 100644 --- a/src/org/atriasoft/ege/components/ComponentTexturePalette.java +++ b/src/org/atriasoft/ege/components/ComponentTexturePalette.java @@ -16,7 +16,7 @@ public class ComponentTexturePalette extends Component { this.palette = ResourcePaletteFile.create(paletteName); this.texture = ResourceTexture2.createNamed("TEXTURE_OF_PALETTE:" + paletteName.toString()); if (this.texture == null) { - Log.error("can not instanciate Texture ..."); + LOGGER.error("can not instanciate Texture ..."); } // element already called updateFromPalette(); @@ -27,7 +27,7 @@ public class ComponentTexturePalette extends Component { } public void updateFromPalette() { - Log.warning("update palet environnement"); + LOGGER.warn("update palet environnement"); final ImageByte img = this.palette.getImageByte(); //IOgami.storePNG(new Uri("/home/heero/000000000aaaaplopppp.png"), img); this.texture.set(img); diff --git a/src/org/atriasoft/ege/components/ComponentTextures.java b/src/org/atriasoft/ege/components/ComponentTextures.java index ab6d30d..d827653 100644 --- a/src/org/atriasoft/ege/components/ComponentTextures.java +++ b/src/org/atriasoft/ege/components/ComponentTextures.java @@ -29,7 +29,7 @@ public class ComponentTextures extends Component { public void setTexture(String name, Uri textureName) { final ResourceTexture texture = ResourceTexture.createFromPng(textureName); if (texture == null) { - Log.error("can not instanciate Texture ..."); + LOGGER.error("can not instanciate Texture ..."); return; } this.textures.put(name, texture); diff --git a/src/org/atriasoft/ege/components/part/LightRender.java b/src/org/atriasoft/ege/components/part/LightRender.java index 870f173..6a38a9a 100644 --- a/src/org/atriasoft/ege/components/part/LightRender.java +++ b/src/org/atriasoft/ege/components/part/LightRender.java @@ -36,7 +36,7 @@ public class LightRender implements PartRenderInterface { // injection stage for (int iii = 0; iii < LightRender.numberOfLight; iii++) { if (lights[iii] != null) { - //Log.warning("Set light : [{}] {}", iii, lights[iii]); + //LOGGER.warn("Set light : [{}] {}", iii, lights[iii]); program.uniformVector(this.GLlights[iii].oGLposition, lights[iii].getPositionDelta()); program.uniformColorRGB(this.GLlights[iii].oGLcolor, lights[iii].getColor()); program.uniformVector(this.GLlights[iii].oGLattenuation, lights[iii].getAttenuation()); diff --git a/src/org/atriasoft/ege/engines/EngineAI.java b/src/org/atriasoft/ege/engines/EngineAI.java index 801e7d1..283c2d3 100644 --- a/src/org/atriasoft/ege/engines/EngineAI.java +++ b/src/org/atriasoft/ege/engines/EngineAI.java @@ -56,7 +56,7 @@ public class EngineAI extends Engine { this.accumulator += deltaMili * 0.0001f; // While there is enough accumulated time to take one or several physics steps while (this.accumulator >= TIME_STEP) { - //Log.warning("AI: Generate for {} / {} for: {}", accumulator, TIME_STEP, components.size()); + //LOGGER.warn("AI: Generate for {} / {} for: {}", accumulator, TIME_STEP, components.size()); // call every object to update their constant forces applied for (ComponentAI it : this.components) { it.update(TIME_STEP); diff --git a/src/org/atriasoft/ege/engines/EngineDynamicMeshs.java b/src/org/atriasoft/ege/engines/EngineDynamicMeshs.java index 1ab5509..231cad2 100644 --- a/src/org/atriasoft/ege/engines/EngineDynamicMeshs.java +++ b/src/org/atriasoft/ege/engines/EngineDynamicMeshs.java @@ -34,12 +34,12 @@ public class EngineDynamicMeshs extends Engine { @Override public void update(long deltaMili) { - //Log.warning("engine update : {} {} >= {}", deltaMili, accumulator, TIME_STEP); + //LOGGER.warn("engine update : {} {} >= {}", deltaMili, accumulator, TIME_STEP); // Add the time difference in the accumulator accumulator += (float)deltaMili*0.0001f; // While there is enough accumulated time to take one or several physics steps while (accumulator >= TIME_STEP) { - //Log.warning("Generate for {} / {} for: {}", accumulator, TIME_STEP, components.size()); + //LOGGER.warn("Generate for {} / {} for: {}", accumulator, TIME_STEP, components.size()); // call every object to update their constant forces applied for (ComponentDynamicMeshs it: components) { it.update(TIME_STEP); diff --git a/src/org/atriasoft/ege/engines/EngineLight.java b/src/org/atriasoft/ege/engines/EngineLight.java index b9c57f2..50a6b24 100644 --- a/src/org/atriasoft/ege/engines/EngineLight.java +++ b/src/org/atriasoft/ege/engines/EngineLight.java @@ -65,17 +65,17 @@ public class EngineLight extends Engine { for (ComponentLightSun elem: this.componentSuns) { out[count] = new Light(elem.getLight().getColor(), elem.getPosition(), elem.getLight().getAttenuation()); if (count>=8) { - Log.error("need to update ligth count"); + LOGGER.error("need to update ligth count"); return out; } count++; } - //Log.warning("Get {}/{} lights (SUN) ...", count, out.length); + //LOGGER.warn("Get {}/{} lights (SUN) ...", count, out.length); float maxDistance = 50*50; for (ComponentLight elem: this.componentLights) { Vector3f pos = elem.getPosition(); if (count>=8) { - Log.error("need to update ligth count"); + LOGGER.error("need to update ligth count"); return out; } if (pos.distance2(position) < maxDistance) { @@ -83,7 +83,7 @@ public class EngineLight extends Engine { count++; } } - //Log.warning("Get {} / {} lights...", count, out.length,); + //LOGGER.warn("Get {} / {} lights...", count, out.length,); return out; } diff --git a/src/org/atriasoft/ege/engines/EngineMap.java b/src/org/atriasoft/ege/engines/EngineMap.java index fd6bcea..82de53f 100644 --- a/src/org/atriasoft/ege/engines/EngineMap.java +++ b/src/org/atriasoft/ege/engines/EngineMap.java @@ -37,7 +37,7 @@ public class EngineMap extends Engine { accumulator += (float)deltaMili*0.0001f; // While there is enough accumulated time to take one or several physics steps while (accumulator >= TIME_STEP) { - // Log.warning("MAP: Generate for {} / {} for: {}", accumulator, TIME_STEP, components.size()); + // LOGGER.warn("MAP: Generate for {} / {} for: {}", accumulator, TIME_STEP, components.size()); // call every object to update their constant forces applied for (ComponentMap it: components) { it.update(TIME_STEP); diff --git a/src/org/atriasoft/ege/engines/EnginePhysics.java b/src/org/atriasoft/ege/engines/EnginePhysics.java index 3694770..6e55d66 100644 --- a/src/org/atriasoft/ege/engines/EnginePhysics.java +++ b/src/org/atriasoft/ege/engines/EnginePhysics.java @@ -27,7 +27,7 @@ public class EnginePhysics extends Engine { super(env); this.gravity = (EngineGravity) env.getEngine("gravity"); if (this.gravity == null) { - Log.critical("Must initialyse Gravity before physics..."); + LOGGER.critical("Must initialyse Gravity before physics..."); } } @@ -86,7 +86,7 @@ public class EnginePhysics extends Engine { public void render(long deltaMili, Camera camera) { // TODO Auto-generated method stub for (ComponentPhysics it : this.components) { - //Log.info("Render {}", it); + //LOGGER.info("Render {}", it); it.renderDebug(this.debugDrawProperty); } //debugDrawProperty.drawCone(2, 5, 9, 12, Matrix4f.identity(), new Color(1,1,0,1)); @@ -107,7 +107,7 @@ public class EnginePhysics extends Engine { this.accumulator += deltaMili * 0.0001f; // While there is enough accumulated time to take one or several physics steps while (this.accumulator >= TIME_STEP) { - Log.verbose("update physic ... {}", this.accumulator); + LOGGER.trace("update physic ... {}", this.accumulator); clearPreviousCycle(); applyForces(TIME_STEP); // update AABB after because in rotation force, the Bounding box change... diff --git a/src/org/atriasoft/ege/engines/EngineRender.java b/src/org/atriasoft/ege/engines/EngineRender.java index 3695b56..026b737 100644 --- a/src/org/atriasoft/ege/engines/EngineRender.java +++ b/src/org/atriasoft/ege/engines/EngineRender.java @@ -42,15 +42,15 @@ public class EngineRender extends Engine { @Override public void render(final long deltaMili, final Camera camera) { - //Log.info("Render ..."); + //LOGGER.info("Render ..."); //Matrix4f tmpMatrix; for (final ComponentRender it : this.components) { - //Log.info("Render {}", it); + //LOGGER.info("Render {}", it); it.render(); } /* getOrderedElementForDisplay(this.displayElementOrdered, camera->getEye(), camera->getViewVector()); - Log.verbose("DRAW : {} / {} element(s)", this.displayElementOrdered.size(), this.component.size()); + LOGGER.trace("DRAW : {} / {} element(s)", this.displayElementOrdered.size(), this.component.size()); // note : the first pass is done at the reverse way to prevent multiple display od the same point in the screen // (and we remember that the first pass is to display all the non transparent elements) @@ -69,10 +69,10 @@ public class EngineRender extends Engine { // @Override // public void renderDebug(long deltaMili, Camera camera) { - // //Log.debug("Draw (start)"); + // //LOGGER.debug("Draw (start)"); // Matrix4f tmpMatrix; // getOrderedElementForDisplay(this.displayElementOrdered, camera->getEye(), camera->getViewVector()); - // Log.verbose("DRAW : {} / {} element(s)", this.displayElementOrdered.size(), this.component.size()); + // LOGGER.trace("DRAW : {} / {} element(s)", this.displayElementOrdered.size(), this.component.size()); //// if (propertyDebugPhysic.get() == true) { //// // Draw debug ... (Object) //// for (int32t iii=this.displayElementOrdered.size()-1; iii >= 0; iii--) { @@ -118,7 +118,7 @@ public class EngineRender extends Engine { this.accumulator += deltaMili * 0.0001f; // While there is enough accumulated time to take one or several physics steps while (this.accumulator >= TIME_STEP) { - // Log.warning("RENDER: Generate for {} / {} for: {}", accumulator, TIME_STEP, components.size()); + // LOGGER.warn("RENDER: Generate for {} / {} for: {}", accumulator, TIME_STEP, components.size()); // call every object to usdate their constant forces applyed for (final ComponentRender it : this.components) { it.update(TIME_STEP); @@ -154,7 +154,7 @@ public class EngineRender extends Engine { // vec3 angleView = (destPosition - position); // angleView.safeNormalize(); // float dotResult = angleView.dot(direction); -// //Log.debug("Dot position : {} ==> dot={}", destPosition, dotResult); +// //LOGGER.debug("Dot position : {} ==> dot={}", destPosition, dotResult); // /* // if (dotResult <= 0.85f) { // // they are not in the camera angle view ... == > no need to process display diff --git a/src/org/atriasoft/ege/map/ComponentDynamicMeshsVoxelMap.java b/src/org/atriasoft/ege/map/ComponentDynamicMeshsVoxelMap.java index 347854a..15c1be7 100644 --- a/src/org/atriasoft/ege/map/ComponentDynamicMeshsVoxelMap.java +++ b/src/org/atriasoft/ege/map/ComponentDynamicMeshsVoxelMap.java @@ -25,7 +25,7 @@ public class ComponentDynamicMeshsVoxelMap extends ComponentDynamicMeshs { } private void drawPlane(final Vector3i base, final int xxx, final int yyy, final int zzz, final int type) { - //Log.warning("Add plane Z : {}, {}, {}", (base.x + xxx), (base.y + yyy), (base.z + zzz)); + //LOGGER.warn("Add plane Z : {}, {}, {}", (base.x + xxx), (base.y + yyy), (base.z + zzz)); Vector3f v1 = new Vector3f(base.x() + xxx, base.y() + yyy, base.z() + zzz); Vector3f v2 = new Vector3f(base.x() + xxx, base.y() + yyy + 1, base.z() + zzz); Vector3f v3 = new Vector3f(base.x() + xxx + 1, base.y() + yyy + 1, base.z() + zzz); @@ -47,7 +47,7 @@ public class ComponentDynamicMeshsVoxelMap extends ComponentDynamicMeshs { } private void drawPlane_anti(final Vector3i base, final int xxx, final int yyy, final int zzz, final int type) { - //Log.warning("Add plane Z : {}, {}, {}", (base.x + xxx), (base.y + yyy), (base.z + zzz)); + //LOGGER.warn("Add plane Z : {}, {}, {}", (base.x + xxx), (base.y + yyy), (base.z + zzz)); Vector3f v1 = new Vector3f(base.x() + xxx, base.y() + yyy, base.z() + zzz); Vector3f v2 = new Vector3f(base.x() + xxx, base.y() + yyy + 1, base.z() + zzz); Vector3f v3 = new Vector3f(base.x() + xxx + 1, base.y() + yyy + 1, base.z() + zzz); @@ -69,7 +69,7 @@ public class ComponentDynamicMeshsVoxelMap extends ComponentDynamicMeshs { } private void drawPlaneVerticalX(final Vector3i base, final int xxx, final int yyy, final int zzz, final int type) { - //Log.warning("Add plane X : {}, {}, {}", (base.x + xxx), (base.y + yyy), (base.z + zzz)); + //LOGGER.warn("Add plane X : {}, {}, {}", (base.x + xxx), (base.y + yyy), (base.z + zzz)); Vector3f v1 = new Vector3f(base.x() + xxx, base.y() + yyy, base.z() + zzz); Vector3f v2 = new Vector3f(base.x() + xxx, base.y() + yyy, base.z() + zzz + 1); Vector3f v3 = new Vector3f(base.x() + xxx, base.y() + yyy + 1, base.z() + zzz + 1); @@ -91,7 +91,7 @@ public class ComponentDynamicMeshsVoxelMap extends ComponentDynamicMeshs { } private void drawPlaneVerticalX_anti(final Vector3i base, final int xxx, final int yyy, final int zzz, final int type) { - //Log.warning("Add plane X : {}, {}, {}", (base.x + xxx), (base.y + yyy), (base.z + zzz)); + //LOGGER.warn("Add plane X : {}, {}, {}", (base.x + xxx), (base.y + yyy), (base.z + zzz)); Vector3f v1 = new Vector3f(base.x() + xxx, base.y() + yyy, base.z() + zzz); Vector3f v2 = new Vector3f(base.x() + xxx, base.y() + yyy, base.z() + zzz + 1); Vector3f v3 = new Vector3f(base.x() + xxx, base.y() + yyy + 1, base.z() + zzz + 1); @@ -113,7 +113,7 @@ public class ComponentDynamicMeshsVoxelMap extends ComponentDynamicMeshs { } private void drawPlaneVerticalY(final Vector3i base, final int xxx, final int yyy, final int zzz, final int type) { - //Log.warning("Add plane Y : {}, {}, {}", (base.x + xxx), (base.y + yyy), (base.z + zzz)); + //LOGGER.warn("Add plane Y : {}, {}, {}", (base.x + xxx), (base.y + yyy), (base.z + zzz)); Vector3f v1 = new Vector3f(base.x() + xxx, base.y() + yyy, base.z() + zzz); Vector3f v2 = new Vector3f(base.x() + xxx, base.y() + yyy, base.z() + zzz + 1); Vector3f v3 = new Vector3f(base.x() + xxx + 1, base.y() + yyy, base.z() + zzz + 1); @@ -135,7 +135,7 @@ public class ComponentDynamicMeshsVoxelMap extends ComponentDynamicMeshs { } private void drawPlaneVerticalY_anti(final Vector3i base, final int xxx, final int yyy, final int zzz, final int type) { - //Log.warning("Add plane Y : {}, {}, {}", (base.x + xxx), (base.y + yyy), (base.z + zzz)); + //LOGGER.warn("Add plane Y : {}, {}, {}", (base.x + xxx), (base.y + yyy), (base.z + zzz)); Vector3f v1 = new Vector3f(base.x() + xxx, base.y() + yyy, base.z() + zzz); Vector3f v2 = new Vector3f(base.x() + xxx, base.y() + yyy, base.z() + zzz + 1); Vector3f v3 = new Vector3f(base.x() + xxx + 1, base.y() + yyy, base.z() + zzz + 1); @@ -158,17 +158,17 @@ public class ComponentDynamicMeshsVoxelMap extends ComponentDynamicMeshs { @Override public void render(final String name) { - //Log.warning("Render : {}", name); + //LOGGER.warn("Render : {}", name); super.render(name); } @Override public void update(final float timeStep) { - Log.warning("update : {}", timeStep); + LOGGER.warn("update : {}", timeStep); if (this.chunk.haveChange() == false) { return; } - Log.warning(" ==> YES"); + LOGGER.warn(" ==> YES"); Voxel[][][] data = this.chunk.getData(); this.unbreakable.clear(); this.stone.clear(); diff --git a/src/org/atriasoft/phyligram/PhysicBox.java b/src/org/atriasoft/phyligram/PhysicBox.java index e7155a9..643930a 100644 --- a/src/org/atriasoft/phyligram/PhysicBox.java +++ b/src/org/atriasoft/phyligram/PhysicBox.java @@ -47,7 +47,7 @@ public class PhysicBox extends PhysicShape { for (Collision elem : this.colisionPoints) { if (elem != null) { if (elem.colisionPointLocal == null) { - Log.error("colision point must be set !!!"); + LOGGER.error("colision point must be set !!!"); continue; } for (int iii = 0; iii < elem.colisionPointLocal.length; iii++) { diff --git a/src/org/atriasoft/phyligram/math/ToolCollisionOBBWithOBB.java b/src/org/atriasoft/phyligram/math/ToolCollisionOBBWithOBB.java index e97437f..c47ac13 100644 --- a/src/org/atriasoft/phyligram/math/ToolCollisionOBBWithOBB.java +++ b/src/org/atriasoft/phyligram/math/ToolCollisionOBBWithOBB.java @@ -26,7 +26,7 @@ class OBB { public class ToolCollisionOBBWithOBB { public static void getCollidePoints(PhysicBox box1, boolean isStatic1, PhysicBox box2, boolean isStatic2) { - // Log.info("Try to calculare reverse force ........"); + // LOGGER.info("Try to calculare reverse force ........"); Vector3f rPos1 = box1.narrowPhaseGlobalPos.less(box2.narrowPhaseGlobalPos); Vector3f rPos2 = box2.narrowPhaseGlobalPos.less(box1.narrowPhaseGlobalPos); Quaternion quat1 = box1.getQuaternionFull(); @@ -41,7 +41,7 @@ public class ToolCollisionOBBWithOBB { // DebugDisplay.relativeTestPos.getTransform().setPosition(tmp); // DebugDisplay.relativeTestPos.getTransform().setOrientation(quatTransfer); // DebugDisplay.boxTest.setSize(box1.getSize()); - // Log.info("==> {} {}", rPos, quatTransfer1); + // LOGGER.info("==> {} {}", rPos, quatTransfer1); // /*res = */getCollidePointsAABBCenteredWithOBB(box1.narrowPhaseHalfSize, box2.narrowPhaseHalfSize, quatTransfer, rPos); /* res = transfert in generic plan the new res ... */ // test origin AABB with OBB collision @@ -201,14 +201,14 @@ public class ToolCollisionOBBWithOBB { if (count != 0) { // Find a point inside the BOX ... /* - Log.info("Detect point inside ... " + insideTopBackRight + " " + insideTopBackLeft + " " + insideTopFrontRight + " " + insideTopFrontLeft + " " + insideBottomBackRight + " " + LOGGER.info("Detect point inside ... " + insideTopBackRight + " " + insideTopBackLeft + " " + insideTopFrontRight + " " + insideTopFrontLeft + " " + insideBottomBackRight + " " + insideBottomBackLeft + " " + insideBottomFrontRight + " " + insideBottomFrontLeft); */ return out; } // line in AABB // TODO: - // Log.info("Need to detect line inside ..."); // pas tot a fait... si ca colisione déja avec un point de l'autre ... + // LOGGER.info("Need to detect line inside ..."); // pas tot a fait... si ca colisione déja avec un point de l'autre ... return null; } @@ -255,9 +255,9 @@ public class ToolCollisionOBBWithOBB { // // // run the code and get the result as a message // if (getCollision(aaa, bbb)) { - // Log.info("Collision!!!"); + // LOGGER.info("Collision!!!"); // } else { - // Log.info("NO Collision!!!"); + // LOGGER.info("NO Collision!!!"); // } // } diff --git a/src/org/atriasoft/phyligram/math/ToolCollisionSphereWithSphere.java b/src/org/atriasoft/phyligram/math/ToolCollisionSphereWithSphere.java index 70132b2..923c3c4 100644 --- a/src/org/atriasoft/phyligram/math/ToolCollisionSphereWithSphere.java +++ b/src/org/atriasoft/phyligram/math/ToolCollisionSphereWithSphere.java @@ -9,7 +9,7 @@ public class ToolCollisionSphereWithSphere { // Note sphere 2 is the reference ... public static ColisionPoint getCollisionPoint(PhysicSphere sphere1, PhysicSphere shapeReference) { if (sphere1.getSize() > shapeReference.getSize()) { - Log.todo("implement then reference is smaller than moving"); + LOGGER.info("[TODO] implement then reference is smaller than moving"); } Vector3f force = sphere1.narrowPhaseGlobalPos.less(shapeReference.narrowPhaseGlobalPos); float distance = shapeReference.getSize() + sphere1.getSize() - force.length(); diff --git a/src/org/atriasoft/phyligram/shape/Concave.java b/src/org/atriasoft/phyligram/shape/Concave.java index ba68ab1..3ad048d 100644 --- a/src/org/atriasoft/phyligram/shape/Concave.java +++ b/src/org/atriasoft/phyligram/shape/Concave.java @@ -24,7 +24,7 @@ public class Concave extends Shape { } */ if (index.size() % 3 != 0) { - Log.error("wrong number of faces : {} ==> not a multiple of 3", index.size()); + LOGGER.error("wrong number of faces : {} ==> not a multiple of 3", index.size()); return; } for (final Integer it : index) { diff --git a/src/org/atriasoft/phyligram/shape/Shape.java b/src/org/atriasoft/phyligram/shape/Shape.java index a1280b0..6aaa6c4 100644 --- a/src/org/atriasoft/phyligram/shape/Shape.java +++ b/src/org/atriasoft/phyligram/shape/Shape.java @@ -31,7 +31,7 @@ public class Shape { } public boolean parse(final String _line) { - Log.error("dfgdfg"); + LOGGER.error("dfgdfg"); /* if(strncmp(_line, "origin:", 7) == 0) { sscanf(&_line[7], "%f %f %f", &m_origin.m_floats[0], &m_origin.m_floats[1], &m_origin.m_floats[2] ); diff --git a/src/org/atriasoft/phyligram/tree/DynamicAABBTree.java b/src/org/atriasoft/phyligram/tree/DynamicAABBTree.java index 8e54561..e2dace6 100644 --- a/src/org/atriasoft/phyligram/tree/DynamicAABBTree.java +++ b/src/org/atriasoft/phyligram/tree/DynamicAABBTree.java @@ -325,7 +325,7 @@ public class DynamicAABBTree { /// Ray casting method public void raycast(final Ray ray, final CallbackRaycast callback) { if (callback == null) { - Log.error("call with null callback"); + LOGGER.error("call with null callback"); return; } float maxFraction = ray.maxFraction; @@ -449,15 +449,15 @@ public class DynamicAABBTree { /// Report all shapes overlapping with the AABB given in parameter. public void reportAllShapesOverlappingWithAABB(final AABB aabb, final CallbackOverlapping callback) { if (callback == null) { - Log.error("call with null callback"); + LOGGER.error("call with null callback"); return; } - //Log.error("reportAllShapesOverlappingWithAABB"); + //LOGGER.error("reportAllShapesOverlappingWithAABB"); // Create a stack with the nodes to visit final Stack stack = new Stack<>(); // 64 max stack.push(this.rootNode); - //Log.error(" add stack: {}", this.rootNode); + //LOGGER.error(" add stack: {}", this.rootNode); // While there are still nodes to visit while (stack.size() > 0) { // Get the next node ID to visit @@ -468,14 +468,14 @@ public class DynamicAABBTree { } // Get the corresponding node final DTree nodeToVisit = nodeIDToVisit; - //Log.error(" check collision: {}", nodeIDToVisit); + //LOGGER.error(" check collision: {}", nodeIDToVisit); // If the AABB in parameter overlaps with the AABB of the node to visit if (aabb.intersect(nodeToVisit.aabb)) { // If the node is a leaf if (nodeToVisit.isLeaf()) { /* if (aabb != nodeToVisit.aabb) { - Log.error(" ======> Real collision ..."); + LOGGER.error(" ======> Real collision ..."); } */ // Notify the broad-phase about a new potential overlapping pair @@ -486,8 +486,8 @@ public class DynamicAABBTree { // We need to visit its children stack.push(tmp.childrenleft); stack.push(tmp.childrenright); - //Log.error(" add stack: {}", tmp.childrenleft); - //Log.error(" add stack: {}", tmp.childrenright); + //LOGGER.error(" add stack: {}", tmp.childrenleft); + //LOGGER.error(" add stack: {}", tmp.childrenright); } } } @@ -513,8 +513,8 @@ public class DynamicAABBTree { public boolean updateObject(final DTree node, final AABB newAABB, final Vector3f displacement, final boolean forceReinsert) { assert (node.isLeaf()); assert (node.height >= 0); - //Log.verbose(" compare : {} {}", node.aabb.getMin(), node.aabb.getMax()); - //Log.verbose(" : {} {}", newAABB.getMin(), newAABB.getMax()); + //LOGGER.trace(" compare : {} {}", node.aabb.getMin(), node.aabb.getMax()); + //LOGGER.trace(" : {} {}", newAABB.getMin(), newAABB.getMax()); // If the new AABB is still inside the fat AABB of the node if (!forceReinsert && node.aabb.contains(newAABB)) { return false; @@ -546,10 +546,10 @@ public class DynamicAABBTree { zmax = node.aabb.getMax().z() + displacement.z(); } node.aabb.set(xmin, ymin, zmin, xmax, ymax, zmax); - //Log.error(" compare : {} {}", node.aabb.getMin(), node.aabb.getMax()); - //Log.error(" : {} {}", newAABB.getMin(), newAABB.getMax()); + //LOGGER.error(" compare : {} {}", node.aabb.getMin(), node.aabb.getMax()); + //LOGGER.error(" : {} {}", newAABB.getMin(), newAABB.getMax()); if (!node.aabb.contains(newAABB)) { - //Log.critical("ERROR"); + //LOGGER.critical("ERROR"); } assert (node.aabb.contains(newAABB)); // Reinsert the node into the tree diff --git a/test/src/test/atriasoft/ege/TestBasicLog.java b/test/src/test/atriasoft/ege/TestBasicLog.java index 7234738..1fa12b6 100644 --- a/test/src/test/atriasoft/ege/TestBasicLog.java +++ b/test/src/test/atriasoft/ege/TestBasicLog.java @@ -51,13 +51,13 @@ public class TestBasicLog { @Test @Order(3) public void ccBasicLogCall() { - Log.print("Simple print"); - Log.todo("Simple todo"); - Log.error("Simple error"); - Log.warning("Simple warning"); - Log.info("Simple info"); - Log.debug("Simple debug"); - Log.verbose("Simple verbose"); + LOGGER.print("Simple print"); + LOGGER.info("[TODO] Simple todo"); + LOGGER.error("Simple error"); + LOGGER.warn("Simple warning"); + LOGGER.info("Simple info"); + LOGGER.debug("Simple debug"); + LOGGER.trace("Simple verbose"); } // TODO REFACTO REMOVE this and set it in the Test of the logger. @@ -72,20 +72,20 @@ public class TestBasicLog { } public static void testLog() { - Log.print("test direct [START]"); + LOGGER.print("test direct [START]"); // test de 10 secondes contre 0.0?? second quand le niveau n'est pas assez grand ... long timeStart = System.currentTimeMillis(); for (int iii = 0; iii < 100000000; iii++) Log2.debug("test direct"); long timeStop = System.currentTimeMillis(); - Log.print("test direct [END]: {} to {} ==> delta={}", timeStart, timeStop, (timeStop - timeStart)); - Log.print("test concat [START]"); + LOGGER.print("test direct [END]: {} to {} ==> delta={}", timeStart, timeStop, (timeStop - timeStart)); + LOGGER.print("test concat [START]"); // C'est très long dans les 2 cas ... timeStart = System.currentTimeMillis(); for (int iii = 0; iii < 6; iii++) Log2.debug("test concat: non fonctionnel, il applelle le get a chaque log ... " + getAAAAAAA(iii)); timeStop = System.currentTimeMillis(); - Log.print("test concat [END]: {} to {} ==> delta={}\", timeStart, timeStop, (timeStop - timeStart)); + LOGGER.print("test concat [END]: {} to {} ==> delta={}\", timeStart, timeStop, (timeStop - timeStart)); } @Test