|
|
@ -403,7 +403,7 @@ public class FakeApplication extends SimpleApplication { |
|
|
|
private ScheduledThreadPoolExecutor fakeAppThread = new ScheduledThreadPoolExecutor(1); |
|
|
|
private ScheduledThreadPoolExecutor fakeAppThread = new ScheduledThreadPoolExecutor(1); |
|
|
|
|
|
|
|
|
|
|
|
public void removeCurrentStates() { |
|
|
|
public void removeCurrentStates() { |
|
|
|
for (Iterator<AppState> it = new ArrayList(appStateManager.getAddedStates()).iterator(); it.hasNext();) { |
|
|
|
for (Iterator<AppState> it = new ArrayList<AppState>(appStateManager.getAddedStates()).iterator(); it.hasNext();) { |
|
|
|
AppState appState = it.next(); |
|
|
|
AppState appState = it.next(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
appStateManager.detach(appState); |
|
|
|
appStateManager.detach(appState); |
|
|
@ -468,7 +468,7 @@ public class FakeApplication extends SimpleApplication { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean runQueuedFake() { |
|
|
|
public boolean runQueuedFake() { |
|
|
|
Future fut = fakeAppThread.submit(new Callable<Void>() { |
|
|
|
Future<Void> fut = fakeAppThread.submit(new Callable<Void>() { |
|
|
|
public Void call() throws Exception { |
|
|
|
public Void call() throws Exception { |
|
|
|
runQueuedTasks(); |
|
|
|
runQueuedTasks(); |
|
|
|
return null; |
|
|
|
return null; |
|
|
@ -490,7 +490,7 @@ public class FakeApplication extends SimpleApplication { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean updateFake(final float tpf) { |
|
|
|
public boolean updateFake(final float tpf) { |
|
|
|
Future fut = fakeAppThread.submit(new Callable<Void>() { |
|
|
|
Future<Void> fut = fakeAppThread.submit(new Callable<Void>() { |
|
|
|
public Void call() throws Exception { |
|
|
|
public Void call() throws Exception { |
|
|
|
AudioContext.setAudioRenderer(audioRenderer); |
|
|
|
AudioContext.setAudioRenderer(audioRenderer); |
|
|
|
appStateManager.update(tpf); |
|
|
|
appStateManager.update(tpf); |
|
|
@ -515,7 +515,7 @@ public class FakeApplication extends SimpleApplication { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean renderFake() { |
|
|
|
public boolean renderFake() { |
|
|
|
Future fut = fakeAppThread.submit(new Callable<Void>() { |
|
|
|
Future<Void> fut = fakeAppThread.submit(new Callable<Void>() { |
|
|
|
public Void call() throws Exception { |
|
|
|
public Void call() throws Exception { |
|
|
|
appStateManager.render(renderManager); |
|
|
|
appStateManager.render(renderManager); |
|
|
|
return null; |
|
|
|
return null; |
|
|
@ -539,7 +539,7 @@ public class FakeApplication extends SimpleApplication { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean updateExternalLogicalState(final Node externalNode, final float tpf) { |
|
|
|
public boolean updateExternalLogicalState(final Node externalNode, final float tpf) { |
|
|
|
Future fut = fakeAppThread.submit(new Callable<Void>() { |
|
|
|
Future<Void> fut = fakeAppThread.submit(new Callable<Void>() { |
|
|
|
public Void call() throws Exception { |
|
|
|
public Void call() throws Exception { |
|
|
|
externalNode.updateLogicalState(tpf); |
|
|
|
externalNode.updateLogicalState(tpf); |
|
|
|
return null; |
|
|
|
return null; |
|
|
@ -563,7 +563,7 @@ public class FakeApplication extends SimpleApplication { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean updateExternalGeometricState(final Node externalNode) { |
|
|
|
public boolean updateExternalGeometricState(final Node externalNode) { |
|
|
|
Future fut = fakeAppThread.submit(new Callable<Void>() { |
|
|
|
Future<Void> fut = fakeAppThread.submit(new Callable<Void>() { |
|
|
|
public Void call() throws Exception { |
|
|
|
public Void call() throws Exception { |
|
|
|
externalNode.updateGeometricState(); |
|
|
|
externalNode.updateGeometricState(); |
|
|
|
return null; |
|
|
|
return null; |
|
|
@ -586,8 +586,8 @@ public class FakeApplication extends SimpleApplication { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Class getClassByName(String className) { |
|
|
|
public Class<?> getClassByName(String className) { |
|
|
|
Class clazz = null; |
|
|
|
Class<?> clazz = null; |
|
|
|
try { |
|
|
|
try { |
|
|
|
clazz = getClass().getClassLoader().loadClass(className); |
|
|
|
clazz = getClass().getClassLoader().loadClass(className); |
|
|
|
} catch (ClassNotFoundException ex) { |
|
|
|
} catch (ClassNotFoundException ex) { |
|
|
@ -606,7 +606,7 @@ public class FakeApplication extends SimpleApplication { |
|
|
|
private void removeAllStates() { |
|
|
|
private void removeAllStates() { |
|
|
|
try { |
|
|
|
try { |
|
|
|
try { |
|
|
|
try { |
|
|
|
for (Iterator<AppState> it = new ArrayList(appStateManager.getAddedStates()).iterator(); it.hasNext();) { |
|
|
|
for (Iterator<AppState> it = new ArrayList<AppState>(appStateManager.getAddedStates()).iterator(); it.hasNext();) { |
|
|
|
AppState appState = it.next(); |
|
|
|
AppState appState = it.next(); |
|
|
|
appStateManager.detach(appState); |
|
|
|
appStateManager.detach(appState); |
|
|
|
} |
|
|
|
} |
|
|
|