Package gaiasky
Class GaiaSky
java.lang.Object
gaiasky.GaiaSky
- All Implemented Interfaces:
com.badlogic.gdx.ApplicationListener
,IObserver
The main class. Holds all the entities manages the update/draw cycle and all
other top-level functions of Gaia Sky.
-
Field Summary
Modifier and TypeFieldDescriptioncom.badlogic.gdx.assets.AssetManager
The asset manager.The main camera manager.The user interfacesThe user interfacesboolean
External view with final rendered scene and no UIfinal Object
Used to wait for new frameslong
Holds the number of frames produced in this session.External UI windowThe user interfacescom.badlogic.gdx.Graphics
Graphics.com.badlogic.gdx.InputMultiplexer
static GaiaSky
Singleton instance.The user interfacesThe user interfacesThe user interfacesboolean
Save state on exitThe user interfacesThe user interfacesTimeTheVRContext
setup increateVR()
, may be null if no HMD is present or SteamVR is not installed.The user interfacescom.badlogic.gdx.backends.lwjgl3.Lwjgl3Window
Window.boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
alpha
(ComponentTypes cts) void
create()
void
dispose()
com.badlogic.gdx.graphics.glutils.FrameBuffer
getCatalogInfoFromEntity
(com.badlogic.ashley.core.Entity entity) double
getT()
HashMap<VRContext.VRDevice,
com.badlogic.ashley.core.Entity> boolean
boolean
boolean
isOn
(int ordinal) boolean
isOn
(ComponentTypes cts) boolean
void
Event notification call.void
parkCameraRunnable
(String key, Runnable runnable) Parks a camera runnable that runs after the update-camera stage, and before the update-scene stage, until it is removed.void
parkRunnable
(String key, Runnable runnable, Map<String, Runnable> map, com.badlogic.gdx.utils.Array<Runnable> runnables) Parks a runnable to the given map and list.void
parkUpdateRunnable
(String key, Runnable runnable) Parks an update runnable that runs after the update-scene stage until it is removed.void
pause()
static void
Posts a runnable that will run once after the current frame.void
Re-initialises all the GUI (step 1).void
Second step in GUI initialisation.void
removeRunnable
(String key) Removes a previously parked update runnable.void
render()
void
void
resize
(int width, int height) void
resizeImmediate
(int width, int height, boolean resizePostProcessors, boolean resizeRenderSys, boolean resizeGuis, boolean resizeScreenConf) void
resume()
void
setCrashed
(boolean crashed) void
Forces a global scene update.void
update
(double dt) Update method.
-
Field Details
-
instance
Singleton instance. -
frameMonitor
Used to wait for new frames -
window
public com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window windowWindow. -
graphics
public com.badlogic.gdx.Graphics graphicsGraphics. -
vrContext
TheVRContext
setup increateVR()
, may be null if no HMD is present or SteamVR is not installed. -
assetManager
public com.badlogic.gdx.assets.AssetManager assetManagerThe asset manager. -
cameraManager
The main camera manager. -
scene
-
sceneRenderer
-
frames
public long framesHolds the number of frames produced in this session. -
inputMultiplexer
public com.badlogic.gdx.InputMultiplexer inputMultiplexer -
welcomeGui
The user interfaces -
loadingGui
The user interfaces -
mainGui
The user interfaces -
spacecraftGui
The user interfaces -
stereoGui
The user interfaces -
debugGui
The user interfaces -
crashGui
The user interfaces -
gamepadGui
The user interfaces -
mainVRGui
The user interfaces -
welcomeGuiVR
-
loadingGuiVR
-
time
Time -
windowCreated
public boolean windowCreated -
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
-
postRunnable
Posts a runnable that will run once after the current frame.- Parameters:
r
- The runnable to post.
-
create
public void create()- Specified by:
create
in interfacecom.badlogic.gdx.ApplicationListener
-
touchSceneGraph
public void touchSceneGraph()Forces a global scene update. Updates the scene with a very small dt to force the re-computation of all entities. -
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:
pause
in interfacecom.badlogic.gdx.ApplicationListener
-
resume
public void resume()- Specified by:
resume
in interfacecom.badlogic.gdx.ApplicationListener
-
dispose
public void dispose()- Specified by:
dispose
in interfacecom.badlogic.gdx.ApplicationListener
-
resetDynamicResolution
public void resetDynamicResolution() -
getBackRenderBuffer
public com.badlogic.gdx.graphics.glutils.FrameBuffer getBackRenderBuffer() -
setCrashed
public void setCrashed(boolean crashed) -
render
public void render()- Specified by:
render
in interfacecom.badlogic.gdx.ApplicationListener
-
update
public void update(double dt) Update method.- Parameters:
dt
- Delta time in seconds.
-
resize
public void resize(int width, int height) - Specified by:
resize
in interfacecom.badlogic.gdx.ApplicationListener
-
resizeImmediate
public void resizeImmediate(int width, int height, boolean resizePostProcessors, boolean resizeRenderSys, boolean resizeGuis, boolean resizeScreenConf) -
getVRDeviceToModel
-
scripting
-
getExecutorService
-
getGuiRegistry
-
getBookmarksManager
-
getICamera
-
getT
public double getT() -
getCameraManager
-
getPostProcessor
-
isOn
public boolean isOn(int ordinal) -
isOn
-
isOn
-
alpha
-
getCatalogInfoFromEntity
-
notify
Description copied from interface:IObserver
Event notification call. -
isInitialised
public boolean isInitialised() -
isHeadless
public boolean isHeadless() -
getGlobalResources
-
getCatalogManager
-
parkUpdateRunnable
Parks an update runnable that runs after the update-scene stage until it is removed.- Parameters:
key
- The key to identify the runnable.runnable
- The runnable to park.
-
parkCameraRunnable
Parks a camera runnable that runs after the update-camera stage, and before the update-scene stage, until it is removed.- Parameters:
key
- The key to identify the runnable.runnable
- The runnable to park.
-
parkRunnable
public void parkRunnable(String key, Runnable runnable, Map<String, Runnable> map, com.badlogic.gdx.utils.Array<Runnable> runnables) Parks a runnable to the given map and list.- Parameters:
key
- The key to identify the runnable.runnable
- The runnable to park.map
- The map to use.runnables
- The runnables list.
-
removeRunnable
Removes a previously parked update runnable.- Parameters:
key
- The key of the runnable to remove.
-