Package gaiasky
Class GaiaSky
java.lang.Object
gaiasky.GaiaSky
- All Implemented Interfaces:
com.badlogic.gdx.ApplicationListener,IObserver,IMainRenderer
public class GaiaSky
extends Object
implements com.badlogic.gdx.ApplicationListener, IObserver, IMainRenderer
The main class. Holds all the entities manages the update/draw cycle and all
other top-level functions of Gaia Sky.
-
Field Summary
FieldsModifier and TypeFieldDescriptioncom.badlogic.gdx.assets.AssetManagerThe asset manager.The main camera manager.The user interfacesThe user interfacesThe user interfacesbooleanExternal view with final rendered scene and no UIfinal ObjectUsed to wait for new frameslongHolds the number of frames produced in this session.External UI windowcom.badlogic.gdx.GraphicsGraphics.com.badlogic.gdx.InputMultiplexerstatic GaiaSkySingleton instance.The user interfacesThe user interfacesThe user interfacesbooleanSave state on exitThe user interfacesThe user interfacesTimeTheVRContextsetup increateVR(), may be null if no HMD is present or SteamVR is not installed.com.badlogic.gdx.graphics.glutils.FrameBufferLoading frame buffers.org.lwjgl.openvr.TextureLoading texture.com.badlogic.gdx.graphics.glutils.FrameBufferLoading frame buffers.org.lwjgl.openvr.TextureLoading texture.The user interfacesThe user interfacescom.badlogic.gdx.backends.lwjgl3.Lwjgl3WindowWindow.boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate()voiddispose()com.badlogic.gdx.graphics.glutils.FrameBuffercom.badlogic.gdx.utils.Array<IFocus>com.badlogic.gdx.graphics.glutils.FrameBuffergetFrameBuffer(int w, int h) doublegetT()booleanbooleanbooleanbooleanisOn(int ordinal) booleanisOn(ComponentTypes cts) booleanvoidEvent notification call.voidparkRunnable(String key, Runnable runnable) Parks a runnable that will run every frame right the update() method (before render) until it is unparked.voidpause()static voidPosts a runnable that will run once after the current frame.voidvoidRe-initialises all the GUI (step 1)voidSecond step in GUI initialisation.voidremoveRunnable(String key) Removes a previously parked runnable.voidrender()voidrenderSgr(ICamera camera, double t, int width, int height, int tw, int th, com.badlogic.gdx.graphics.glutils.FrameBuffer frameBuffer, IPostProcessor.PostProcessBean ppb) voidvoidresize(int width, int height) voidresizeImmediate(int width, int height, boolean resizePostProcessors, boolean resizeRenderSys, boolean resizeGuis, boolean resizeScreenConf) voidresume()voidsetCrashed(boolean crashed) voidvoidupdate(double dt) Update method.
-
Field Details
-
instance
Singleton instance. -
window
public com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window windowWindow. -
graphics
public com.badlogic.gdx.Graphics graphicsGraphics. -
vrContext
TheVRContextsetup increateVR(), may be null if no HMD is present or SteamVR is not installed. -
vrLoadingLeftFb
public com.badlogic.gdx.graphics.glutils.FrameBuffer vrLoadingLeftFbLoading frame buffers. -
vrLoadingRightFb
public com.badlogic.gdx.graphics.glutils.FrameBuffer vrLoadingRightFbLoading frame buffers. -
vrLoadingLeftTex
public org.lwjgl.openvr.Texture vrLoadingLeftTexLoading texture. -
vrLoadingRightTex
public org.lwjgl.openvr.Texture vrLoadingRightTexLoading texture. -
assetManager
public com.badlogic.gdx.assets.AssetManager assetManagerThe asset manager. -
cameraManager
The main camera manager. -
sceneGraph
-
sgr
-
frames
public long framesHolds the number of frames produced in this session. -
inputMultiplexer
public com.badlogic.gdx.InputMultiplexer inputMultiplexer -
welcomeGui
The user interfaces -
welcomeGuiVR
The user interfaces -
loadingGui
The user interfaces -
loadingGuiVR
The user interfaces -
mainGui
The user interfaces -
spacecraftGui
The user interfaces -
stereoGui
The user interfaces -
debugGui
The user interfaces -
crashGui
The user interfaces -
controllerGui
The user interfaces -
time
Time -
windowCreated
public boolean windowCreated -
frameMonitor
Used to wait for new frames -
saveState
public boolean saveStateSave state on exit -
externalView
public boolean externalViewExternal view with final rendered scene and no UI -
gaiaSkyView
External UI window
-
-
Constructor Details
-
GaiaSky
public GaiaSky()Creates an instance of Gaia Sky. -
GaiaSky
public GaiaSky(boolean skipWelcome, boolean vr, boolean externalView, boolean headless, boolean noScriptingServer, boolean debugMode) Creates an instance of Gaia Sky.- Parameters:
skipWelcome- Skips welcome screen if possible.vr- Launch in VR mode.externalView- Open a new window with a view of the rendered scene.headless- Launch in headless mode, without window.debugMode- Output debug information.
-
-
Method Details
-
create
public void create()- Specified by:
createin interfacecom.badlogic.gdx.ApplicationListener
-
touchSceneGraph
public void touchSceneGraph() -
reinitialiseGUI1
public void reinitialiseGUI1()Re-initialises all the GUI (step 1) -
reinitialiseGUI2
public void reinitialiseGUI2()Second step in GUI initialisation. -
pause
public void pause()- Specified by:
pausein interfacecom.badlogic.gdx.ApplicationListener
-
resume
public void resume()- Specified by:
resumein interfacecom.badlogic.gdx.ApplicationListener
-
dispose
public void dispose()- Specified by:
disposein interfacecom.badlogic.gdx.ApplicationListener
-
resetDynamicResolution
public void resetDynamicResolution() -
getBackRenderBuffer
public com.badlogic.gdx.graphics.glutils.FrameBuffer getBackRenderBuffer() -
setCrashed
public void setCrashed(boolean crashed) -
isCrashed
public boolean isCrashed() -
render
public void render()- Specified by:
renderin interfacecom.badlogic.gdx.ApplicationListener
-
update
public void update(double dt) Update method.- Parameters:
dt- Delta time in seconds.
-
preRenderScene
public void preRenderScene()- Specified by:
preRenderScenein interfaceIMainRenderer
-
renderSgr
public void renderSgr(ICamera camera, double t, int width, int height, int tw, int th, com.badlogic.gdx.graphics.glutils.FrameBuffer frameBuffer, IPostProcessor.PostProcessBean ppb) - Specified by:
renderSgrin interfaceIMainRenderer
-
resize
public void resize(int width, int height) - Specified by:
resizein interfacecom.badlogic.gdx.ApplicationListener
-
resizeImmediate
public void resizeImmediate(int width, int height, boolean resizePostProcessors, boolean resizeRenderSys, boolean resizeGuis, boolean resizeScreenConf) -
getFocusableEntities
-
getFrameBuffer
public com.badlogic.gdx.graphics.glutils.FrameBuffer getFrameBuffer(int w, int h) - Specified by:
getFrameBufferin interfaceIMainRenderer
-
getVRDeviceToModel
-
scripting
-
getExecutorService
-
getGuiRegistry
-
getBookmarksManager
-
getICamera
- Specified by:
getICamerain interfaceIMainRenderer
-
getT
public double getT()- Specified by:
getTin interfaceIMainRenderer
-
getCameraManager
- Specified by:
getCameraManagerin interfaceIMainRenderer
-
getPostProcessor
- Specified by:
getPostProcessorin interfaceIMainRenderer
-
isOn
public boolean isOn(int ordinal) -
isOn
-
isOn
-
getCatalogInfoFromObject
-
notify
Description copied from interface:IObserverEvent notification call. -
isInitialised
public boolean isInitialised() -
isHeadless
public boolean isHeadless() -
getGlobalResources
-
parkRunnable
Parks a runnable that will run every frame right the update() method (before render) until it is unparked.- Parameters:
key- The key to identify the runnable.runnable- The runnable.
-
removeRunnable
Removes a previously parked runnable.- Parameters:
key- The key of the runnable to remove.
-
postRunnable
Posts a runnable that will run once after the current frame.- Parameters:
r- The runnable to post.
-