@Immutable public final class Rotation extends Object implements Comparable<Rotation>
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Rotation o) |
boolean |
equals(Object o) |
static Rotation |
from(float pitch,
float yaw) |
static Rotation |
from(float pitch,
float yaw,
float roll) |
static Rotation |
from(com.flowpowered.math.vector.Vector3f rotation)
Copies the value from a specified
Vector3f instance into a Rotation instance. |
float |
getHeadYaw() |
float |
getPitch() |
float |
getRoll() |
float |
getYaw() |
int |
hashCode() |
String |
toString() |
com.flowpowered.math.vector.Vector2f |
toVector2f() |
com.flowpowered.math.vector.Vector3f |
toVector3f()
Returns the values contained in this object as a
Vector3f. |
public static final Rotation ZERO
public static Rotation from(com.flowpowered.math.vector.Vector3f rotation)
Vector3f instance into a Rotation instance.rotation - the vector to usepublic static Rotation from(float pitch, float yaw, float roll)
public static Rotation from(float pitch, float yaw)
public float getPitch()
public float getYaw()
public float getHeadYaw()
public float getRoll()
public com.flowpowered.math.vector.Vector2f toVector2f()
public com.flowpowered.math.vector.Vector3f toVector3f()
Vector3f. The X value will be the pitch, the Y value
is the yaw, and the Z value will be the head yaw.Vector3f instancepublic int compareTo(Rotation o)
compareTo in interface Comparable<Rotation>Copyright © 2017–2020 NukkitX. All rights reserved.