Package hm.zelha.particlesfx.util
Class Rotation
java.lang.Object
hm.zelha.particlesfx.util.Rotation
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double pitch, double yaw, double roll) voidaddAxis(double pitch, double yaw, double roll) adds the given pitch, yaw, and roll to this rotation's axis, which will be applied before this rotation inapply(Vector)org.bukkit.util.Vectorapply(org.bukkit.util.Vector v) voidapplyPitch(org.bukkit.util.Vector v) voidapplyRoll(org.bukkit.util.Vector v) voidapplyYaw(org.bukkit.util.Vector v) clone()doubledoubledoubledoublegetPitch()doublegetRoll()doublegetYaw()voidset(double pitch, double yaw, double roll) voidsetAxis(double pitch, double yaw, double roll) sets this rotation's axis to the given pitch, yaw, and roll, which will be applied before this rotation inapply(Vector)voidsetAxisPitch(double pitch) sets this rotation's axis to the given pitch, which will be applied before this rotation inapply(Vector)voidsetAxisRoll(double roll) sets this rotation's axis to the given roll, which will be applied before this rotation inapply(Vector)voidsetAxisYaw(double yaw) sets this rotation's axis to the given yaw, which will be applied before this rotation inapply(Vector)voidsetPitch(double pitch) voidsetRoll(double roll) voidsetRotationOrder(Rotation.Axis first, Rotation.Axis second, Rotation.Axis third) Changes the order that rotations are applied.voidsetYaw(double yaw)
-
Constructor Details
-
Rotation
public Rotation(double pitch, double yaw, double roll) -
Rotation
public Rotation()
-
-
Method Details
-
clone
-
inherit
- Parameters:
rotation- object for this rotation class to copy data from- Returns:
- this object
-
inherit
- Parameters:
shape- object for this rotation class to copy data from- Returns:
- this object
-
apply
public org.bukkit.util.Vector apply(org.bukkit.util.Vector v) - Parameters:
v- vector for this rotation to be applied to- Returns:
- the given vector
-
applyPitch
public void applyPitch(org.bukkit.util.Vector v) - Parameters:
v- vector for this rotation's pitch to be applied to
-
applyYaw
public void applyYaw(org.bukkit.util.Vector v) - Parameters:
v- vector for this rotation's yaw to be applied to
-
applyRoll
public void applyRoll(org.bukkit.util.Vector v) - Parameters:
v- vector for this rotation's roll to be applied to
-
add
public void add(double pitch, double yaw, double roll) -
addAxis
public void addAxis(double pitch, double yaw, double roll) adds the given pitch, yaw, and roll to this rotation's axis, which will be applied before this rotation inapply(Vector)- Parameters:
pitch- how much to add to pitchyaw- how much to add to yawroll- how much to add to roll
-
setRotationOrder
Changes the order that rotations are applied. Default is pitch, yaw, then roll.- Parameters:
first- first axis to be appliedsecond- second axis to be appliedthird- third axis to be applied
-
set
public void set(double pitch, double yaw, double roll) -
setPitch
public void setPitch(double pitch) -
setYaw
public void setYaw(double yaw) -
setRoll
public void setRoll(double roll) -
setAxis
public void setAxis(double pitch, double yaw, double roll) sets this rotation's axis to the given pitch, yaw, and roll, which will be applied before this rotation inapply(Vector)- Parameters:
pitch- pitch to setyaw- yaw to setroll- roll to set
-
setAxisPitch
public void setAxisPitch(double pitch) sets this rotation's axis to the given pitch, which will be applied before this rotation inapply(Vector)- Parameters:
pitch- pitch to set
-
setAxisYaw
public void setAxisYaw(double yaw) sets this rotation's axis to the given yaw, which will be applied before this rotation inapply(Vector)- Parameters:
yaw- yaw to set
-
setAxisRoll
public void setAxisRoll(double roll) sets this rotation's axis to the given roll, which will be applied before this rotation inapply(Vector)- Parameters:
roll- roll to set
-
getRotationOrder
- Returns:
- an array of axes where [0] is the first rotation applied, [1] is the second, and [2] is the third.
-
getPitch
public double getPitch() -
getYaw
public double getYaw() -
getRoll
public double getRoll() -
getAxisPitch
public double getAxisPitch()- Returns:
- the pitch of this rotation's axis, which will be applied before this rotation in
apply(Vector)
-
getAxisYaw
public double getAxisYaw()- Returns:
- the yaw of this rotation's axis, which will be applied before this rotation in
apply(Vector)
-
getAxisRoll
public double getAxisRoll()- Returns:
- the roll of this rotation's axis, which will be applied before this rotation in
apply(Vector)
-