Package gaia.cu9.ari.gaiaorbit.data
Class JsonLoader<T extends SceneGraphNode>
- java.lang.Object
-
- gaia.cu9.ari.gaiaorbit.data.JsonLoader<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
ISceneGraphLoader
public class JsonLoader<T extends SceneGraphNode> extends java.lang.Object implements 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 Constructor Description JsonLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
convertJsonToMap(com.badlogic.gdx.utils.JsonValue json)
int
depth(com.badlogic.gdx.utils.JsonValue attribute)
void
initialize(java.lang.String[] files)
com.badlogic.gdx.utils.Array<? extends SceneGraphNode>
loadData()
void
setDescription(java.lang.String description)
void
setName(java.lang.String name)
Pair<java.lang.Object,java.lang.Class>
to1DoubleArray(com.badlogic.gdx.utils.JsonValue attribute)
Pair<java.lang.Object,java.lang.Class>
to2DoubleArray(com.badlogic.gdx.utils.JsonValue attribute)
Pair<java.lang.Object,java.lang.Class>
to3DoubleArray(com.badlogic.gdx.utils.JsonValue attribute)
Pair<java.lang.Object,java.lang.Class>
toMultidimDoubleArray(com.badlogic.gdx.utils.JsonValue attribute)
-
-
-
Method Detail
-
initialize
public void initialize(java.lang.String[] files)
- Specified by:
initialize
in interfaceISceneGraphLoader
-
loadData
public com.badlogic.gdx.utils.Array<? extends SceneGraphNode> loadData()
- Specified by:
loadData
in interfaceISceneGraphLoader
-
depth
public int depth(com.badlogic.gdx.utils.JsonValue attribute)
-
toMultidimDoubleArray
public Pair<java.lang.Object,java.lang.Class> toMultidimDoubleArray(com.badlogic.gdx.utils.JsonValue attribute)
-
to1DoubleArray
public Pair<java.lang.Object,java.lang.Class> to1DoubleArray(com.badlogic.gdx.utils.JsonValue attribute)
-
to2DoubleArray
public Pair<java.lang.Object,java.lang.Class> to2DoubleArray(com.badlogic.gdx.utils.JsonValue attribute)
-
to3DoubleArray
public Pair<java.lang.Object,java.lang.Class> to3DoubleArray(com.badlogic.gdx.utils.JsonValue attribute)
-
convertJsonToMap
public java.util.Map<java.lang.String,java.lang.Object> convertJsonToMap(com.badlogic.gdx.utils.JsonValue json)
-
setName
public void setName(java.lang.String name)
- Specified by:
setName
in interfaceISceneGraphLoader
-
setDescription
public void setDescription(java.lang.String description)
- Specified by:
setDescription
in interfaceISceneGraphLoader
-
-