Package gaiasky.data
Class JsonLoader<T extends SceneGraphNode>
java.lang.Object
gaiasky.data.JsonLoader<T>
- All Implemented Interfaces:
ISceneGraphLoader
Implements the loading of scene graph nodes using libgdx's json library.
It loads entities in the JSON format described in this link.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertJsonToMap(com.badlogic.gdx.utils.JsonValue json) intdepth(com.badlogic.gdx.utils.JsonValue attribute) voidinitialize(String[] files) voidinitialize(uk.ac.starlink.util.DataSource ds) com.badlogic.gdx.utils.Array<? extends SceneGraphNode>loadData()voidsetDescription(String description) voidvoidto1DoubleArray(com.badlogic.gdx.utils.JsonValue attribute) to2DoubleArray(com.badlogic.gdx.utils.JsonValue attribute) to3DoubleArray(com.badlogic.gdx.utils.JsonValue attribute) toMultidimDoubleArray(com.badlogic.gdx.utils.JsonValue attribute)
-
Constructor Details
-
JsonLoader
public JsonLoader()
-
-
Method Details
-
initialize
- Specified by:
initializein interfaceISceneGraphLoader
-
initialize
public void initialize(uk.ac.starlink.util.DataSource ds) - Specified by:
initializein interfaceISceneGraphLoader
-
loadData
- Specified by:
loadDatain interfaceISceneGraphLoader
-
depth
public int depth(com.badlogic.gdx.utils.JsonValue attribute) -
toMultidimDoubleArray
-
to1DoubleArray
-
to2DoubleArray
-
to3DoubleArray
-
convertJsonToMap
-
setName
- Specified by:
setNamein interfaceISceneGraphLoader
-
setDescription
- Specified by:
setDescriptionin interfaceISceneGraphLoader
-
setParams
- Specified by:
setParamsin interfaceISceneGraphLoader
-