public class Transform extends Message
| Modifier and Type | Field and Description |
|---|---|
static String |
FIELD_ROTATION
The name of the rotation field for the message.
|
static String |
FIELD_TRANSLATION
The name of the translation field for the message.
|
static String |
TYPE
The message type.
|
EMPTY_MESSAGEEMPTY_JSON| Constructor and Description |
|---|
Transform()
Create a new Transform with all 0s.
|
Transform(Vector3 translation,
Quaternion rotation)
Create a new Transform with the given translation and rotation values.
|
| Modifier and Type | Method and Description |
|---|---|
Transform |
clone()
Create a clone of this Transform.
|
static Transform |
fromJsonObject(javax.json.JsonObject jsonObject)
Create a new Transform based on the given JSON object.
|
static Transform |
fromJsonString(String jsonString)
Create a new Transform based on the given JSON string.
|
static Transform |
fromMessage(Message m)
Create a new Transform based on the given Message.
|
Quaternion |
getRotation()
Get the rotation value of this transform.
|
Vector3 |
getTranslation()
Get the translation value of this transform.
|
getMessageType, setMessageTypeequals, hashCode, toJsonObject, toStringpublic static final String FIELD_TRANSLATION
public static final String FIELD_ROTATION
public static final String TYPE
public Transform()
public Transform(Vector3 translation, Quaternion rotation)
translation - The translation value of the transform.rotation - The rotation value of the transform.public Vector3 getTranslation()
public Quaternion getRotation()
public static Transform fromJsonString(String jsonString)
jsonString - The JSON string to parse.public static Transform fromMessage(Message m)
m - The Message to parse.public static Transform fromJsonObject(javax.json.JsonObject jsonObject)
jsonObject - The JSON object to parse.Copyright © 2014. All rights reserved.