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) int
depth
(com.badlogic.gdx.utils.JsonValue attribute) void
initialize
(String[] files) void
initialize
(uk.ac.starlink.util.DataSource ds) com.badlogic.gdx.utils.Array<? extends SceneGraphNode>
loadData()
void
setDescription
(String description) void
void
to1DoubleArray
(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:
initialize
in interfaceISceneGraphLoader
-
initialize
public void initialize(uk.ac.starlink.util.DataSource ds) - Specified by:
initialize
in interfaceISceneGraphLoader
-
loadData
- Specified by:
loadData
in interfaceISceneGraphLoader
-
depth
public int depth(com.badlogic.gdx.utils.JsonValue attribute) -
toMultidimDoubleArray
-
to1DoubleArray
-
to2DoubleArray
-
to3DoubleArray
-
convertJsonToMap
-
setName
- Specified by:
setName
in interfaceISceneGraphLoader
-
setDescription
- Specified by:
setDescription
in interfaceISceneGraphLoader
-
setParams
- Specified by:
setParams
in interfaceISceneGraphLoader
-