[DEV] update some logs models

This commit is contained in:
Edouard DUPIN 2022-04-11 00:50:23 +02:00
parent 7628561fb6
commit 3068e57245
21 changed files with 77 additions and 77 deletions

View File

@ -27,7 +27,7 @@ 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 + ")");
Log.verbose("Periodic call on Entry({});", event);
/*
if (!self.shape.periodicCall(event)) {
//Log.error("end periodic call");
@ -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);
Log.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 ... " + event + " relPos = " + relPos);
//Log.warning("Event on Input ... {} relPos= {}", event, relPos);
this.env.onPointer(event.specialKey(), event.type(), event.inputId(), relPos, event.status());
return true;

View File

@ -86,23 +86,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);
Log.warning(" 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);
Log.warning(" 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);
Log.warning(" 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);
Log.warning(" values: {} / {}", this.minBrush, this.maxBrush);
return true;
}
// width brush

View File

@ -79,7 +79,7 @@ public class ControlCameraPlayer implements ControlInterface {
@Override
public boolean onEventInput(final EventInput event, final Vector3f relativePosition) {
// Log.info("" + event);
// Log.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());
Log.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());
Log.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);
//Log.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));
//Log.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);
//Log.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);
//Log.info(" res=({},{})", offsetX, offsetY);
this.camera.setPosition(new Vector3f(playerTransform.getPosition().x() + offsetX, playerTransform.getPosition().y() + offsetY, playerTransform.getPosition().z() + 1.6f + verticalDistance));
}

View File

@ -59,7 +59,7 @@ public class ControlCameraPlayerFPS implements ControlInterface {
@Override
public boolean onEventInput(final EventInput event, final Vector3f relativePosition) {
// Log.info("" + event);
// Log.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());
Log.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);
//Log.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());
}

View File

@ -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);
Log.warning("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);
Log.warning("init(Object) not implemented: uId={}", this.uID);
return false;
}
@ -256,7 +256,7 @@ public class Entity {
}
}
if (findIt == false) {
//Log.error("try to remove an unexisting component type : '" + type + "'");
//Log.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("[" + getUID() + "] Entity is killed ...");
Log.debug("[{}] Entity is killed ...", getUID());
}
if (this.life != previousLife) {
onLifeChange();

View File

@ -42,9 +42,9 @@ public class Environement {
Log.error("Try to add an empty CREATOR ...");
return;
}
Log.debug("Add creator: " + type);
Log.debug("Add creator: {}", type);
creators.put(type, creator);
Log.debug("Add creator: " + type + " (done)");
Log.debug("Add creator: {} (done)", type);
}
@ -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 + "'");
Log.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 + "'");
Log.error("null pointer creator == > internal error... '{}'", type);
return null;
}
final Entity tmpEntity = creatorPointer.create(this, value);
if (tmpEntity == null) {
Log.error("allocation error '" + type + "'");
Log.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 + "'");
Log.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: " + cameraName + " time:" + deltaMilli);
//Log.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 + "'");
Log.error("Render: Can not get camera named: '{}'", cameraName);
return;
}
OpenGL.setCameraMatrix(camera.getConvertionMatrix());
for (final Engine it : this.engines) {
//Log.verbose(" render: " + it.getType());
//Log.verbose(" render: {}", it.getType());
it.render(deltaMilli, camera);
}
// for (Engine it: engine) {
// if(it == null) {
// continue;
// }
// Log.verbose(" render: " + it.getType());
// Log.verbose(" render: {}", it.getType());
// it.renderDebug(deltaMilli, camera);
// }

View File

@ -25,7 +25,7 @@ public class ComponentLight extends Component {
if (component instanceof PositionningInterface tmp) {
this.position = tmp;
} else {
Log.error("component: " + component.getClass().getCanonicalName() + " is not an instance of " + PositionningInterface.class.getCanonicalName());
Log.error("component: {} is not an instance of {}", component.getClass().getCanonicalName(), PositionningInterface.class.getCanonicalName());
}
}
}

View File

@ -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);
Log.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);
Log.info("apply acceleration: {}", this.acceleration);
Log.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);
Log.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);
Log.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);
Log.error("Not manage collision model... {}", shape);
}
}
} else {
Log.error("Not manage collision model... " + shapeCurrent);
Log.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);
Log.error("Not manage collision model... {}", shapeRemote);
}
return out;
}

View File

@ -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);
Log.critical("Can not Load the Mesh for now ... {}", meshUrl);
final ResourceStaticMeshObj mesh = ResourceStaticMeshObj.create(meshUrl);
setMesh("default", mesh);
}

View File

@ -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]);
//Log.warning("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());

View File

@ -56,8 +56,8 @@ 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 " + accumulator + " / " + TIME_STEP + " for:" + components.size());
// call every object to usdate their constant forces applyed
//Log.warning("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);
}

View File

@ -34,13 +34,13 @@ public class EngineDynamicMeshs extends Engine {
@Override
public void update(long deltaMili) {
//Log.warning("engine update : " + deltaMili + " " + accumulator + " >= " + TIME_STEP);
//Log.warning("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 " + accumulator + " / " + TIME_STEP + " for:" + components.size());
// call every object to usdate their constant forces applyed
//Log.warning("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);
}

View File

@ -70,7 +70,7 @@ public class EngineLight extends Engine {
}
count++;
}
//Log.warning("Get " + count + "/" + out.length + " lights (SUN) ...");
//Log.warning("Get {}/{} lights (SUN) ...", count, out.length);
float maxDistance = 50*50;
for (ComponentLight elem: this.componentLights) {
Vector3f pos = elem.getPosition();
@ -83,7 +83,7 @@ public class EngineLight extends Engine {
count++;
}
}
//Log.warning("Get " + count + "/" + out.length + " lights...");
//Log.warning("Get {} / {} lights...", count, out.length,);
return out;
}

View File

@ -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 " + accumulator + " / " + TIME_STEP + " for:" + components.size());
// Log.warning("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);

View File

@ -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);
//Log.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);
Log.verbose("update physic ... {}", this.accumulator);
clearPreviousCycle();
applyForces(TIME_STEP);
// update AABB after because in rotation force, the Bounding box change...

View File

@ -45,12 +45,12 @@ public class EngineRender extends Engine {
//Log.info("Render ...");
//Matrix4f tmpMatrix;
for (final ComponentRender it : this.components) {
//Log.info("Render " + it);
//Log.info("Render {}", it);
it.render();
}
/*
getOrderedElementForDisplay(this.displayElementOrdered, camera->getEye(), camera->getViewVector());
Log.verbose("DRAW : " + this.displayElementOrdered.size() + "/" + this.component.size() + " elements");
Log.verbose("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)
@ -72,7 +72,7 @@ public class EngineRender extends Engine {
// //Log.debug("Draw (start)");
// Matrix4f tmpMatrix;
// getOrderedElementForDisplay(this.displayElementOrdered, camera->getEye(), camera->getViewVector());
// Log.verbose("DRAW : " + this.displayElementOrdered.size() + "/" + this.component.size() + " elements");
// Log.verbose("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 " + accumulator + " / " + TIME_STEP + " for:" + components.size());
// Log.warning("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 : " + destPosition + " == > dot=" + dotResult);
// //Log.debug("Dot position : {} ==> dot={}", destPosition, dotResult);
// /*
// if (dotResult <= 0.85f) {
// // they are not in the camera angle view ... == > no need to process display

View File

@ -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));
//Log.warning("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));
//Log.warning("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));
//Log.warning("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));
//Log.warning("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));
//Log.warning("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));
//Log.warning("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,13 +158,13 @@ public class ComponentDynamicMeshsVoxelMap extends ComponentDynamicMeshs {
@Override
public void render(final String name) {
//Log.warning("Render : " + name);
//Log.warning("Render : {}", name);
super.render(name);
}
@Override
public void update(final float timeStep) {
Log.warning("update : " + timeStep);
Log.warning("update : {}", timeStep);
if (this.chunk.haveChange() == false) {
return;
}

View File

@ -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);
// Log.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

View File

@ -24,7 +24,7 @@ public class Concave extends Shape {
}
*/
if (index.size() % 3 != 0) {
Log.error("wrong number of faces : " + index.size() + " ==> not a multiple of 3");
Log.error("wrong number of faces : {} ==> not a multiple of 3", index.size());
return;
}
for (final Integer it : index) {

View File

@ -457,7 +457,7 @@ public class DynamicAABBTree<INTERNAL_DATA_TYPE> {
final Stack<DTree> stack = new Stack<>();
// 64 max
stack.push(this.rootNode);
//Log.error(" add stack: " + this.rootNode);
//Log.error(" add stack: {}", this.rootNode);
// While there are still nodes to visit
while (stack.size() > 0) {
// Get the next node ID to visit
@ -468,7 +468,7 @@ public class DynamicAABBTree<INTERNAL_DATA_TYPE> {
}
// Get the corresponding node
final DTree nodeToVisit = nodeIDToVisit;
//Log.error(" check colision: " + nodeIDToVisit);
//Log.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
@ -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);
//Log.error(" add stack: {}", tmp.childrenleft);
//Log.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());
//Log.verbose(" compare : {} {}", node.aabb.getMin(), node.aabb.getMax());
//Log.verbose(" : {} {}", 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,8 +546,8 @@ 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());
//Log.error(" compare : {} {}", node.aabb.getMin(), node.aabb.getMax());
//Log.error(" : {} {}", newAABB.getMin(), newAABB.getMax());
if (!node.aabb.contains(newAABB)) {
//Log.critical("ERROR");
}

View File

@ -78,14 +78,14 @@ public class TestBasicLog {
for (int iii = 0; iii < 100000000; iii++)
Log2.debug("test direct");
long timeStop = System.currentTimeMillis();
Log.print("test direct [END] : " + timeStart + " to " + timeStop + " ==> delta=" + (timeStop - timeStart));
Log.print("test direct [END]: {} to {} ==> delta={}", timeStart, timeStop, (timeStop - timeStart));
Log.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] : " + timeStart + " to " + timeStop + " ==> delta=" + (timeStop - timeStart));
Log.print("test concat [END]: {} to {} ==> delta={}\", timeStart, timeStop, (timeStop - timeStart));
}
@Test