Class Settings.DataSettings

java.lang.Object
gaiasky.util.SettingsObject
gaiasky.util.Settings.DataSettings
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IObserver, Cloneable
Enclosing class:
Settings

public static class Settings.DataSettings extends SettingsObject implements IObserver
Holds configuration options related to the data files.
  • Field Details

    • location

      public String location
      Location of the data directory.
    • dataFiles

      public List<String> dataFiles
      A list of all the enabled data files. These will be loaded at startup.
    • reflectionSkyboxLocation

      public String reflectionSkyboxLocation
      Location of the default reflection skybox (cubemap).
    • pullCloudData

      public boolean pullCloudData
      Pull current cloud data for supported objects.
    • highAccuracy

      public boolean highAccuracy
      Whether to use high accuracy mode in the calculations. Results in more precise locations for some objects.
    • realGaiaAttitude

      public boolean realGaiaAttitude
      Whether to use the real attitude of Gaia, or the analytical one (NSL).
  • Constructor Details

    • DataSettings

      public DataSettings()
  • Method Details

    • setSkyboxLocation

      public void setSkyboxLocation(String location)
      This method keeps compatibility with older versions of the configuration file where the setting reflectionSkyboxLocation was called skyboxLocation.
      Parameters:
      location - The reflection skybox location.
    • dataPath

      public Path dataPath(String pathStr, String dsLocation)
    • dataPath

      public Path dataPath(String path)
    • dataFile

      public String dataFile(String path, String dsLocation)
    • dataFile

      public String dataFile(String path)
    • dataFileHandle

      public com.badlogic.gdx.files.FileHandle dataFileHandle(String path, String dsLocation)
    • dataFileHandle

      public com.badlogic.gdx.files.FileHandle dataFileHandle(String path)
    • isEnabled

      public boolean isEnabled(String datasetKey)
      Checks whether the dataset with the given key is enabled. This method works by checking if any of the currently enabled dataset descriptor file paths contains the key. If the key is very lenient, it will most probably return true, so be sure to set a correct key.
      Parameters:
      datasetKey - The dataset key to look up.
      Returns:
      True if the dataset is currently enabled, false otherwise.
    • enableDataset

      public boolean enableDataset(Path dataset)
      Adds the given dataset descriptor file to the list of enabled JSON files.
      Parameters:
      dataset - The dataset descriptor file pointer.
      Returns:
      True if the catalog was added, false if it does not exist, or it is not a file, or it is not readable, or it is already in the list.
    • disableDataset

      public void disableDataset(Dataset dataset)
      Disables the given Dataset by removing it from the dataFiles list of enabled datasets.
      Parameters:
      dataset - The dataset.
    • clone

      public Settings.DataSettings clone()
      Overrides:
      clone in class SettingsObject
    • setParentRecursive

      protected void setParentRecursive(SettingsObject s)
      Specified by:
      setParentRecursive in class SettingsObject
    • setupListeners

      protected void setupListeners()
      Specified by:
      setupListeners in class SettingsObject
    • dispose

      public void dispose()
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
    • apply

      public void apply()
    • notify

      public void notify(Event event, Object source, Object... data)
      Description copied from interface: IObserver
      Event notification call.
      Specified by:
      notify in interface IObserver
      Parameters:
      event - The event type.
      source - The source object, if any.
      data - The data associated with this event.