[FEAT] use Maven a build system root tool
This commit is contained in:
parent
f0eb83909f
commit
b2c0eb7da6
35
.classpath
35
.classpath
@ -1,30 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry excluding="**/*.java__|**/__*.java|org/atriasoft/arkon/|org/atriasoft/eagle/" kind="src" path="src">
|
||||
<classpathentry including="**/*.java" kind="src" output="out/maven/classes" path="src">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="resources"/>
|
||||
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/atriasoft-ewol">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/atriasoft-io-gami">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5">
|
||||
<classpathentry kind="src" output="out/maven/test-classes" path="test/src">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="out/eclipse/classes"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="out/maven/classes"/>
|
||||
</classpath>
|
||||
|
19
.project
19
.project
@ -1,34 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>atriasoft-ege</name>
|
||||
<name>ege</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
<project>atriasoft-ege</project>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.python.pydev.PyDevBuilder</name>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1646149232188</id>
|
||||
<name></name>
|
||||
<type>30</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
||||
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?eclipse-pydev version="1.0"?><pydev_project>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property>
|
||||
</pydev_project>
|
@ -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',
|
||||
|
133
pom.xml
Normal file
133
pom.xml
Normal file
@ -0,0 +1,133 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.atriasoft</groupId>
|
||||
<artifactId>ege</artifactId>
|
||||
<version>0.1.0</version>
|
||||
<properties>
|
||||
<maven.compiler.version>3.13.0</maven.compiler.version>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<maven.dependency.version>3.1.1</maven.dependency.version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>gitea</id>
|
||||
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>gitea</id>
|
||||
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>gitea</id>
|
||||
<url>https://gitea.atria-soft.org/api/packages/org.atriasoft/maven</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.atriasoft</groupId>
|
||||
<artifactId>ewol</artifactId>
|
||||
<version>0.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.atriasoft</groupId>
|
||||
<artifactId>ephysics</artifactId>
|
||||
<version>0.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.atriasoft</groupId>
|
||||
<artifactId>loader3d</artifactId>
|
||||
<version>0.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>5.9.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>2.0.7</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<testSourceDirectory>test/src</testSourceDirectory>
|
||||
<directory>${project.basedir}/out/maven/</directory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven.compiler.version}</version>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
<!--<encoding>${project.build.sourceEncoding}</encoding>-->
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Create the source bundle -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- junit results -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M5</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>fully.qualified.MainClass</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Java-doc generation for stand-alone site -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<configuration>
|
||||
<show>private</show>
|
||||
<nohelp>true</nohelp>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<!-- Generate Java-docs As Part Of Project Reports -->
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<configuration>
|
||||
<show>public</show>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
|
||||
</project>
|
@ -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));
|
||||
|
@ -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() {}
|
||||
|
@ -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);
|
||||
|
@ -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() {}
|
||||
|
@ -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() {}
|
||||
|
@ -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);
|
||||
|
@ -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() {}
|
||||
|
@ -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())));
|
||||
|
@ -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 ]");
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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() {}
|
||||
|
@ -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 ]");
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
// }
|
||||
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 ...");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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());
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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...
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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++) {
|
||||
|
@ -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!!!");
|
||||
// }
|
||||
// }
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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) {
|
||||
|
@ -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] );
|
||||
|
@ -325,7 +325,7 @@ public class DynamicAABBTree<INTERNAL_DATA_TYPE> {
|
||||
/// 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<INTERNAL_DATA_TYPE> {
|
||||
/// 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<DTree> 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<INTERNAL_DATA_TYPE> {
|
||||
}
|
||||
// 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<INTERNAL_DATA_TYPE> {
|
||||
// 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<INTERNAL_DATA_TYPE> {
|
||||
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<INTERNAL_DATA_TYPE> {
|
||||
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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user