public class Quaternion extends Message
| Modifier and Type | Field and Description |
|---|---|
static String |
FIELD_W
The name of the z field for the message.
|
static String |
FIELD_X
The name of the x field for the message.
|
static String |
FIELD_Y
The name of the y field for the message.
|
static String |
FIELD_Z
The name of the z field for the message.
|
static String |
TYPE
The message type.
|
EMPTY_MESSAGEEMPTY_JSON| Constructor and Description |
|---|
Quaternion()
Create a new Quaternion with all 0s.
|
Quaternion(double x,
double y,
double z,
double w)
Create a new quaternion with the given values.
|
| Modifier and Type | Method and Description |
|---|---|
Quaternion |
clone()
Create a clone of this Quaternion.
|
static Quaternion |
fromJsonObject(javax.json.JsonObject jsonObject)
Create a new Quaternion based on the given JSON object.
|
static Quaternion |
fromJsonString(String jsonString)
Create a new Quaternion based on the given JSON string.
|
static Quaternion |
fromMessage(Message m)
Create a new Quaternion based on the given Message.
|
double |
getW()
Get the w value of this quaternion.
|
double |
getX()
Get the x value of this quaternion.
|
double |
getY()
Get the y value of this quaternion.
|
double |
getZ()
Get the z value of this quaternion.
|
getMessageType, setMessageTypeequals, hashCode, toJsonObject, toStringpublic static final String FIELD_X
public static final String FIELD_Y
public static final String FIELD_Z
public static final String FIELD_W
public static final String TYPE
public Quaternion()
public Quaternion(double x,
double y,
double z,
double w)
x - The x value of the quaternion.y - The y value of the quaternion.z - The z value of the quaternion.w - The w value of the quaternion.public double getX()
public double getY()
public double getZ()
public double getW()
public Quaternion clone()
public static Quaternion fromJsonString(String jsonString)
jsonString - The JSON string to parse.public static Quaternion fromMessage(Message m)
m - The Message to parse.public static Quaternion fromJsonObject(javax.json.JsonObject jsonObject)
jsonObject - The JSON object to parse.Copyright © 2014. All rights reserved.