/** * Get the VR underlying hardware. * @return the VR underlying hardware. */ public VRAPI getVRHardware() { return getVREnvironment().getVRHardware(); }
/** * Get the VR mouse manager attached to this app state. * @return the VR mouse manager attached to this application. */ public VRMouseManager getVRMouseManager(){ return getVREnvironment().getVRMouseManager(); }
public TestSceneStress() { super(new StatsAppState(), new DebugKeysAppState(), new BasicProfilerState(false), new FlyCamAppState(), new ScreenshotAppState("", System.currentTimeMillis())); }
@Override protected void onEnable() { getApplication().setAppProfiler(prof); ((SimpleApplication) getApplication()).getGuiNode().attachChild(ui); }
/** * Sets the number frames displayed and tracked. * @param count the number of frames */ public void setFrameCount( int count ) { if( profiler.getFrameCount() == count ) { return; } profiler.setFrameCount(count); refreshBackground(); }
@Override public void postRender() { if (time > REFRESH_TIME) { prof.appStep(AppStep.EndFrame); Map<String, DetailedProfiler.StatLine> data = prof.getStats(); displayData(data); time = 0; } }
public void update() { app.update(); // call to remove the splash screen, if present. // call after app.update() to make sure no gap between // splash screen going away and app display being shown. if (firstDrawFrame) { removeSplashScreen(); firstDrawFrame = false; } }
@Override public void update() { app.update(); // call to remove the splash screen, if present. // call after app.update() to make sure no gap between // splash screen going away and app display being shown. if (firstDrawFrame) { removeSplashScreen(); firstDrawFrame = false; } }
/** * Enqueues a runnable object to execute in the jME3 * rendering thread. * <p> * Runnables are executed right at the beginning of the main loop. * They are executed even if the application is currently paused * or out of focus. * * @param runnable The runnable to run in the main jME3 thread */ public void enqueue(Runnable runnable){ enqueue(new RunnableWrapper(runnable)); }
/** * Starts the application in {@link Type#Display display} mode. * * @see #start(com.jme3.system.JmeContext.Type) */ public void start(){ start(JmeContext.Type.Display, false); }
public BasicProfilerState( boolean enabled ) { setEnabled(enabled); this.profiler = new BasicProfiler(); }
/** * Starts the rendering thread after createCanvas() has been called. * <p> * Same as calling startCanvas(false) * * @see #startCanvas(boolean) */ public void startCanvas(){ startCanvas(false); }
/** * Create a new default VR app state that relies on the given {@link VREnvironment VR environment}. * @param environment the {@link VREnvironment VR environment} that this app state is using. */ public VRAppState(VREnvironment environment) { super(); this.environment = environment; this.setSettings(environment.getSettings()); }
/** * Get the GUI manager attached to this app state. * @return the GUI manager attached to this app state. */ public VRGuiManager getVRGUIManager(){ return getVREnvironment().getVRGUIManager(); }
/** * Get the VR view manager. * @return the VR view manager. */ public VRViewManager getVRViewManager() { return getVREnvironment().getVRViewManager(); }
/** * Enqueues a runnable object to execute in the jME3 * rendering thread. * <p> * Runnables are executed right at the beginning of the main loop. * They are executed even if the application is currently paused * or out of focus. * * @param runnable The runnable to run in the main jME3 thread */ public void enqueue(Runnable runnable){ enqueue(new RunnableWrapper(runnable)); }
/** * Get the scene observer. If no observer has been set, this method return the application {@link #getCamera() camera}. * @return the scene observer. * @see #setObserver(Spatial) */ public Object getObserver() { return environment.getObserver(); }
/** * Starts the application in {@link Type#Display display} mode. * * @see #start(com.jme3.system.JmeContext.Type) */ public void start(boolean waitFor){ start(JmeContext.Type.Display, waitFor); }
/** * Starts the application. * Creating a rendering context and executing * the main loop in a separate thread. */ public void start(JmeContext.Type contextType) { start(contextType, false); }