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 as well
as the image rendering.
-
Field Summary
Modifier and TypeFieldDescriptionThe user interfacesThe user interfacesThe user interfacesboolean
External view with final rendered scene and no UIUsed to wait for new frameslong
External UI windowstatic com.badlogic.gdx.backends.lwjgl3.Lwjgl3Graphics
Graphicscom.badlogic.gdx.InputMultiplexer
static GaiaSky
Singleton instanceThe user interfacesThe user interfacesThe user interfacescom.badlogic.gdx.assets.AssetManager
boolean
Save state on exitThe user interfacesThe user interfacesTimeTheVRContext
setup increateVR()
, may be null if no HMD is present or SteamVR is not installedcom.badlogic.gdx.graphics.glutils.FrameBuffer
Loading fborg.lwjgl.openvr.Texture
Loading texturecom.badlogic.gdx.graphics.glutils.FrameBuffer
Loading fborg.lwjgl.openvr.Texture
Loading textureThe user interfacesThe user interfacesstatic com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window
Windowboolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
create()
void
dispose()
com.badlogic.gdx.graphics.glutils.FrameBuffer
com.badlogic.gdx.utils.Array<IFocus>
com.badlogic.gdx.graphics.glutils.FrameBuffer
getFrameBuffer(int w, int h)
double
getT()
boolean
boolean
boolean
isOn(int ordinal)
boolean
isOn(ComponentTypes cts)
boolean
isOn(ComponentTypes.ComponentType comp)
void
void
parkRunnable(String key, Runnable runnable)
Parks a runnable that will run every frame right the update() method (before render) until it is unparkedvoid
pause()
static void
postRunnable(Runnable r)
void
void
Reinitialises all the GUI (step 1)void
Second step in GUI initialisation.void
render()
void
renderSgr(ICamera camera, double t, int width, int height, int tw, int th, com.badlogic.gdx.graphics.glutils.FrameBuffer frameBuffer, IPostProcessor.PostProcessBean ppb)
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
unparkRunnable(String key)
Unparks a previously parked runnablevoid
update(double dt)
Update method.
-
Field Details
-
instance
Singleton instance -
window
public static com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window windowWindow -
graphics
public static com.badlogic.gdx.backends.lwjgl3.Lwjgl3Graphics graphicsGraphics -
vrContext
TheVRContext
setup increateVR()
, may be null if no HMD is present or SteamVR is not installed -
vrLoadingLeftFb
public com.badlogic.gdx.graphics.glutils.FrameBuffer vrLoadingLeftFbLoading fb -
vrLoadingRightFb
public com.badlogic.gdx.graphics.glutils.FrameBuffer vrLoadingRightFbLoading fb -
vrLoadingLeftTex
public org.lwjgl.openvr.Texture vrLoadingLeftTexLoading texture -
vrLoadingRightTex
public org.lwjgl.openvr.Texture vrLoadingRightTexLoading texture -
manager
public com.badlogic.gdx.assets.AssetManager manager -
cam
-
sg
-
frames
public long frames -
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 -
gaiaskyUI
External UI window
-
-
Constructor Details
-
GaiaSky
public GaiaSky()Creates an instance of Gaia Sky. -
GaiaSky
public GaiaSky(boolean skipWelcome, boolean vr, boolean externalView, boolean noScriptingServer, boolean debugMode)Creates an instance of Gaia Sky.- Parameters:
skipWelcome
- Skips welcome screen if possiblevr
- Launch in VR modeexternalView
- Open a new window with a view of the rendered scenedebugMode
- Output debug information
-
-
Method Details
-
create
public void create()- Specified by:
create
in interfacecom.badlogic.gdx.ApplicationListener
-
reinitialiseGUI1
public void reinitialiseGUI1()Reinitialises 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
-
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:
render
in interfacecom.badlogic.gdx.ApplicationListener
-
update
public void update(double dt)Update method.- Parameters:
dt
- Delta time in seconds.
-
preRenderScene
public void preRenderScene()- Specified by:
preRenderScene
in 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:
renderSgr
in interfaceIMainRenderer
-
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) -
getFocusableEntities
-
getFrameBuffer
public com.badlogic.gdx.graphics.glutils.FrameBuffer getFrameBuffer(int w, int h)- Specified by:
getFrameBuffer
in interfaceIMainRenderer
-
getVRDeviceToModel
-
getICamera
- Specified by:
getICamera
in interfaceIMainRenderer
-
getT
public double getT()- Specified by:
getT
in interfaceIMainRenderer
-
getCameraManager
- Specified by:
getCameraManager
in interfaceIMainRenderer
-
getPostProcessor
- Specified by:
getPostProcessor
in interfaceIMainRenderer
-
isOn
public boolean isOn(int ordinal) -
isOn
-
isOn
-
notify
-
isInitialised
public boolean isInitialised() -
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 runnablerunnable
- The runnable
-
unparkRunnable
Unparks a previously parked runnable- Parameters:
key
- The key of the runnable to unpark
-
postRunnable
-