public static class TransformationHelper.Deserializer extends java.lang.Object implements com.google.gson.JsonDeserializer<TransformationMatrix>
コンストラクタと説明 |
---|
Deserializer() |
修飾子とタイプ | メソッドと説明 |
---|---|
TransformationMatrix |
deserialize(com.google.gson.JsonElement json,
java.lang.reflect.Type typeOfT,
com.google.gson.JsonDeserializationContext context)
Gson invokes this call-back method during deserialization when it encounters a field of the
specified type.
|
static Quaternion |
parseAxisRotation(com.google.gson.JsonElement e) |
static float[] |
parseFloatArray(com.google.gson.JsonElement e,
int length,
java.lang.String prefix) |
static Matrix4f |
parseMatrix(com.google.gson.JsonElement e) |
static Quaternion |
parseRotation(com.google.gson.JsonElement e) |
public TransformationMatrix deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
com.google.gson.JsonDeserializer
In the implementation of this call-back method, you should consider invoking
JsonDeserializationContext.deserialize(JsonElement, Type)
method to create objects
for any non-trivial field of the returned object. However, you should never invoke it on the
the same type passing json
since that will cause an infinite loop (Gson will call your
call-back method again).
deserialize
インタフェース内 com.google.gson.JsonDeserializer<TransformationMatrix>
json
- The Json data being deserializedtypeOfT
- The type of the Object to deserialize toT
com.google.gson.JsonParseException
- if json is not in the expected format of typeofT
public static Matrix4f parseMatrix(com.google.gson.JsonElement e)
public static float[] parseFloatArray(com.google.gson.JsonElement e, int length, java.lang.String prefix)
public static Quaternion parseAxisRotation(com.google.gson.JsonElement e)
public static Quaternion parseRotation(com.google.gson.JsonElement e)