From dc40faaff8c3f55b3819df0f141ac3f8cdbd5153 Mon Sep 17 00:00:00 2001 From: Nehon Date: Sun, 12 Feb 2017 15:53:40 +0100 Subject: [PATCH] Moved DetailedProfiler to a more appropriate package --- .../com/jme3/{post => app}/DetailedProfiler.java | 2 +- .../jme3/{post => app}/DetailedProfilerState.java | 14 +++++++------- .../src/main/java/jme3test/post/TestSSAO2.java | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) rename jme3-core/src/main/java/com/jme3/{post => app}/DetailedProfiler.java (99%) rename jme3-core/src/main/java/com/jme3/{post => app}/DetailedProfilerState.java (98%) diff --git a/jme3-core/src/main/java/com/jme3/post/DetailedProfiler.java b/jme3-core/src/main/java/com/jme3/app/DetailedProfiler.java similarity index 99% rename from jme3-core/src/main/java/com/jme3/post/DetailedProfiler.java rename to jme3-core/src/main/java/com/jme3/app/DetailedProfiler.java index 409f122bd..403af46ad 100644 --- a/jme3-core/src/main/java/com/jme3/post/DetailedProfiler.java +++ b/jme3-core/src/main/java/com/jme3/app/DetailedProfiler.java @@ -1,4 +1,4 @@ -package com.jme3.post; +package com.jme3.app; import com.jme3.profile.*; import com.jme3.renderer.Renderer; diff --git a/jme3-core/src/main/java/com/jme3/post/DetailedProfilerState.java b/jme3-core/src/main/java/com/jme3/app/DetailedProfilerState.java similarity index 98% rename from jme3-core/src/main/java/com/jme3/post/DetailedProfilerState.java rename to jme3-core/src/main/java/com/jme3/app/DetailedProfilerState.java index 249845471..fa1de0cb3 100644 --- a/jme3-core/src/main/java/com/jme3/post/DetailedProfilerState.java +++ b/jme3-core/src/main/java/com/jme3/app/DetailedProfilerState.java @@ -1,7 +1,5 @@ -package com.jme3.post; +package com.jme3.app; -import com.jme3.app.Application; -import com.jme3.app.SimpleApplication; import com.jme3.app.state.BaseAppState; import com.jme3.font.BitmapFont; import com.jme3.font.BitmapText; @@ -18,8 +16,6 @@ import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.*; -import static com.jme3.post.DetailedProfiler.*; - /** * Created by Nehon on 25/01/2017. */ @@ -164,7 +160,7 @@ public class DetailedProfilerState extends BaseAppState { } maxLevel = Math.max(maxLevel, path.split("/").length); StatLineView line = getStatLineView(path); - StatLine statLine = data.get(path); + DetailedProfiler.StatLine statLine = data.get(path); line.updateValues(statLine.getAverageCpu(), statLine.getAverageGpu()); String parent = getParent(path); while (parent != null) { @@ -236,12 +232,16 @@ public class DetailedProfilerState extends BaseAppState { public void postRender() { if (time > REFRESH_TIME) { prof.appStep(AppStep.EndFrame); - Map data = prof.getStats(); + Map data = prof.getStats(); displayData(data); time = 0; } } + public Node getUiNode() { + return ui; + } + private double getMsFromNs(double time) { return time / 1000000.0; } diff --git a/jme3-examples/src/main/java/jme3test/post/TestSSAO2.java b/jme3-examples/src/main/java/jme3test/post/TestSSAO2.java index ec1ea2c5a..678484e08 100644 --- a/jme3-examples/src/main/java/jme3test/post/TestSSAO2.java +++ b/jme3-examples/src/main/java/jme3test/post/TestSSAO2.java @@ -36,7 +36,7 @@ import com.jme3.light.*; import com.jme3.material.Material; import com.jme3.math.*; import com.jme3.post.FilterPostProcessor; -import com.jme3.post.DetailedProfilerState; +import com.jme3.app.DetailedProfilerState; import com.jme3.post.ssao.SSAOFilter; import com.jme3.scene.*; import com.jme3.scene.shape.Box;