public class Quaternion
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
Quaternion(double theta)
Creates a
Quaternion from a given angle (assumed to be yaw, for 2D poses). |
Quaternion(double roll,
double pitch,
double yaw)
Creates a
Quaternion from given angles (roll, pitch and yaw). |
Quaternion(double x,
double y,
double z,
double w)
Create a
Quaternion given its parameters. |
| Modifier and Type | Method and Description |
|---|---|
double[] |
getRollPitchYaw()
Get the roll, pitch and yaw angles in radians represented by this
Quaternion. |
double |
getTheta()
Get the angle in radians represented by this
Quaternion. |
double |
getW()
Get the W component of this
Quaternion. |
double |
getX()
Get the X component of this
Quaternion. |
double |
getY()
Get the Y component of this
Quaternion. |
double |
getZ()
Get the Z component of this
Quaternion. |
public Quaternion(double x,
double y,
double z,
double w)
Quaternion given its parameters.x - X component of this Quaternion.y - Y component of this Quaternion.z - Z component of this Quaternion.w - W component of this Quaternion.public Quaternion(double roll,
double pitch,
double yaw)
Quaternion from given angles (roll, pitch and yaw).roll - The angle around the X axispitch - The angle around the Y axisyaw - The angle around the Z axispublic Quaternion(double theta)
Quaternion from a given angle (assumed to be yaw, for 2D poses).theta - The angle to encode as a Quaternion.public double[] getRollPitchYaw()
Quaternion.Quaternion.public double getTheta()
Quaternion.Quaternion.public double getX()
Quaternion.Quaternion.public double getY()
Quaternion.Quaternion.public double getZ()
Quaternion.Quaternion.public double getW()
Quaternion.Quaternion.