Package org.bukkit.util
Class EulerAngle
java.lang.Object
org.bukkit.util.EulerAngle
public class EulerAngle
extends java.lang.Object
EulerAngle is used to represent 3 angles, one for each
axis (x, y, z). The angles are in radians
-
Field Summary
Fields Modifier and Type Field Description static EulerAngleZEROA EulerAngle with every axis set to 0 -
Constructor Summary
Constructors Constructor Description EulerAngle(double x, double y, double z)Creates a EularAngle with each axis set to the passed angle in radians -
Method Summary
Modifier and Type Method Description EulerAngleadd(double x, double y, double z)Creates a new EulerAngle which is the result of adding the x, y, z components to this EulerAnglebooleanequals(java.lang.Object o)doublegetX()Returns the angle on the x axis in radiansdoublegetY()Returns the angle on the y axis in radiansdoublegetZ()Returns the angle on the z axis in radiansinthashCode()EulerAnglesetX(double x)Return a EulerAngle which is the result of changing the x axis to the passed angleEulerAnglesetY(double y)Return a EulerAngle which is the result of changing the y axis to the passed angleEulerAnglesetZ(double z)Return a EulerAngle which is the result of changing the z axis to the passed angleEulerAnglesubtract(double x, double y, double z)Creates a new EulerAngle which is the result of subtracting the x, y, z components to this EulerAngle
-
Field Details
-
ZERO
A EulerAngle with every axis set to 0
-
-
Constructor Details
-
EulerAngle
public EulerAngle(double x, double y, double z)Creates a EularAngle with each axis set to the passed angle in radians- Parameters:
x- the angle for the x axis in radiansy- the angle for the x axis in radiansz- the angle for the x axis in radians
-
-
Method Details
-
getX
public double getX()Returns the angle on the x axis in radians- Returns:
- the angle in radians
-
getY
public double getY()Returns the angle on the y axis in radians- Returns:
- the angle in radians
-
getZ
public double getZ()Returns the angle on the z axis in radians- Returns:
- the angle in radians
-
setX
Return a EulerAngle which is the result of changing the x axis to the passed angle- Parameters:
x- the angle in radians- Returns:
- the resultant EulerAngle
-
setY
Return a EulerAngle which is the result of changing the y axis to the passed angle- Parameters:
y- the angle in radians- Returns:
- the resultant EulerAngle
-
setZ
Return a EulerAngle which is the result of changing the z axis to the passed angle- Parameters:
z- the angle in radians- Returns:
- the resultant EulerAngle
-
add
Creates a new EulerAngle which is the result of adding the x, y, z components to this EulerAngle- Parameters:
x- the angle to add to the x axis in radiansy- the angle to add to the y axis in radiansz- the angle to add to the z axis in radians- Returns:
- the resultant EulerAngle
-
subtract
Creates a new EulerAngle which is the result of subtracting the x, y, z components to this EulerAngle- Parameters:
x- the angle to subtract to the x axis in radiansy- the angle to subtract to the y axis in radiansz- the angle to subtract to the z axis in radians- Returns:
- the resultant EulerAngle
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-