Package gaiasky

Class 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 Details

    • instance

      public static GaiaSky instance
      Singleton instance
    • window

      public com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window window
    • graphics

      public com.badlogic.gdx.backends.lwjgl3.Lwjgl3Graphics graphics
    • vrContext

      public VRContext vrContext
      The VRContext setup in createVR(), may be null if no HMD is present or SteamVR is not installed
    • vrLoadingLeftFb

      public vrLoadingLeftFb
      Loading frame buffers
    • vrLoadingRightFb

      public vrLoadingRightFb
      Loading frame buffers
    • vrLoadingLeftTex

      public org.lwjgl.openvr.Texture vrLoadingLeftTex
      Loading texture
    • vrLoadingRightTex

      public org.lwjgl.openvr.Texture vrLoadingRightTex
      Loading texture
    • assetManager

      public com.badlogic.gdx.assets.AssetManager assetManager
    • cameraManager

      public CameraManager cameraManager
    • sceneGraph

      public ISceneGraph sceneGraph
    • sgr

      public SceneGraphRenderer sgr
    • frames

      public long frames
    • inputMultiplexer

      public com.badlogic.gdx.InputMultiplexer inputMultiplexer
    • welcomeGui

      public IGui welcomeGui
      The user interfaces
    • welcomeGuiVR

      public IGui welcomeGuiVR
      The user interfaces
    • loadingGui

      public IGui loadingGui
      The user interfaces
    • loadingGuiVR

      public IGui loadingGuiVR
      The user interfaces
    • mainGui

      public IGui mainGui
      The user interfaces
    • spacecraftGui

      public IGui spacecraftGui
      The user interfaces
    • stereoGui

      public IGui stereoGui
      The user interfaces
    • debugGui

      public IGui debugGui
      The user interfaces
    • crashGui

      public IGui crashGui
      The user interfaces
    • controllerGui

      public IGui controllerGui
      The user interfaces
    • time

      public ITimeFrameProvider time
    • windowCreated

      public boolean windowCreated
    • frameMonitor

      public final Object frameMonitor
      Used to wait for new frames
    • saveState

      public boolean saveState
      Save state on exit
    • externalView

      public boolean externalView
      External view with final rendered scene and no UI
    • gaiaSkyView

      public GaiaSkyView 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 noScriptingServer, boolean debugMode)
      Creates an instance of Gaia Sky.
      skipWelcome - Skips welcome screen if possible
      vr - Launch in VR mode
      externalView - Open a new window with a view of the rendered scene
      debugMode - Output debug information
  • Method Details

    • create

      public void create()
      Specified by:
      create in interface com.badlogic.gdx.ApplicationListener
    • 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 interface com.badlogic.gdx.ApplicationListener
    • resume

      public void resume()
      Specified by:
      resume in interface com.badlogic.gdx.ApplicationListener
    • dispose

      public void dispose()
      Specified by:
      dispose in interface com.badlogic.gdx.ApplicationListener
    • getBackRenderBuffer

      public getBackRenderBuffer()
    • setCrashed

      public void setCrashed(boolean crashed)
    • isCrashed

      public boolean isCrashed()
    • render

      public void render()
      Specified by:
      render in interface com.badlogic.gdx.ApplicationListener
    • update

      public void update(double dt)
      Update method.
      dt - Delta time in seconds.
    • preRenderScene

      public void preRenderScene()
      Specified by:
      preRenderScene in interface IMainRenderer
    • renderSgr

      public void renderSgr(ICamera camera, double t, int width, int height, int tw, int th, frameBuffer, IPostProcessor.PostProcessBean ppb)
      Specified by:
      renderSgr in interface IMainRenderer
    • resize

      public void resize(int width, int height)
      Specified by:
      resize in interface com.badlogic.gdx.ApplicationListener
    • resizeImmediate

      public void resizeImmediate(int width, int height, boolean resizePostProcessors, boolean resizeRenderSys, boolean resizeGuis, boolean resizeScreenConf)
    • getFocusableEntities

      public com.badlogic.gdx.utils.Array<IFocus> getFocusableEntities()
    • getFrameBuffer

      public getFrameBuffer(int w, int h)
      Specified by:
      getFrameBuffer in interface IMainRenderer
    • getVRDeviceToModel

      public HashMap<VRContext.VRDevice,​StubModel> getVRDeviceToModel()
    • scripting

      public IScriptingInterface scripting()
    • getDatasetUpdater

      public DatasetUpdater getDatasetUpdater()
    • getGuiRegistry

      public GuiRegistry getGuiRegistry()
    • getBookmarksManager

      public BookmarksManager getBookmarksManager()
    • getICamera

      public ICamera getICamera()
      Specified by:
      getICamera in interface IMainRenderer
    • getT

      public double getT()
      Specified by:
      getT in interface IMainRenderer
    • getCameraManager

      public CameraManager getCameraManager()
      Specified by:
      getCameraManager in interface IMainRenderer
    • getPostProcessor

      public IPostProcessor getPostProcessor()
      Specified by:
      getPostProcessor in interface IMainRenderer
    • isOn

      public boolean isOn(int ordinal)
    • isOn

      public boolean isOn(ComponentTypes.ComponentType comp)
    • isOn

      public boolean isOn(ComponentTypes cts)
    • notify

      public void notify(Events event, Object... data)
      Description copied from interface: IObserver
      Event notification call.
      Specified by:
      notify in interface IObserver
      event - The event type.
      data - The data associated with this event.
    • isInitialised

      public boolean isInitialised()
    • getGlobalResources

      public GlobalResources getGlobalResources()
    • parkRunnable

      public void parkRunnable(String key, Runnable runnable)
      Parks a runnable that will run every frame right the update() method (before render) until it is unparked.
      key - The key to identify the runnable.
      runnable - The runnable.
    • removeRunnable

      public void removeRunnable(String key)
      Removes a previously parked runnable.
      key - The key of the runnable to remove.
    • postRunnable

      public static void postRunnable(Runnable r)
      Posts a runnable that will run once after the current frame.
      r - The runnable to post.