@Immutable public final class Rotation extends Object
| Constructor and Description |
|---|
Rotation(float pitch,
float yaw) |
Rotation(float pitch,
float yaw,
float roll) |
Rotation(com.flowpowered.math.vector.Vector2f rotation) |
Rotation(com.flowpowered.math.vector.Vector2f rotation,
float roll) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static Rotation |
from(float pitch,
float headYaw,
float yaw) |
static Rotation |
fromVector3f(com.flowpowered.math.vector.Vector3f vector3f)
Copies the value from a specified
Vector3f instance into a Rotation instance. |
com.flowpowered.math.vector.Vector2f |
getBodyRotation() |
float |
getHeadYaw() |
float |
getPitch() |
float |
getRoll() |
float |
getYaw() |
int |
hashCode() |
String |
toString() |
com.flowpowered.math.vector.Vector3f |
toVector3f()
Returns the values contained in this object as a
Vector3f. |
public static final Rotation ZERO
public Rotation(com.flowpowered.math.vector.Vector2f rotation)
public Rotation(float pitch,
float yaw)
public Rotation(com.flowpowered.math.vector.Vector2f rotation,
float roll)
public Rotation(float pitch,
float yaw,
float roll)
public static Rotation fromVector3f(com.flowpowered.math.vector.Vector3f vector3f)
Vector3f instance into a Rotation instance.vector3f - the vector to usepublic static Rotation from(float pitch, float headYaw, float yaw)
public float getPitch()
public float getYaw()
public float getHeadYaw()
public float getRoll()
public com.flowpowered.math.vector.Vector2f getBodyRotation()
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 instanceCopyright © 2017–2019 NukkitX. All rights reserved.