Class CoordinateRotator

java.lang.Object
com.hypixel.hytale.procedurallib.random.CoordinateRotator
All Implemented Interfaces:
ICoordinateRandomizer
Direct Known Subclasses:
CoordinateOriginRotator

public class CoordinateRotator extends Object implements ICoordinateRandomizer
Rotates coordinates about an origin of (x=0,y=0,z=0)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final CoordinateRotator
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    CoordinateRotator(double pitch, double yaw)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double[]
    createRotationMatrix(double pitch, double yaw)
    Returns a rotation matrix for the given pitch and yaw angles.
    double
    randomDoubleX(int seed, double x, double y)
     
    double
    randomDoubleX(int seed, double x, double y, double z)
     
    double
    randomDoubleY(int seed, double x, double y)
     
    double
    randomDoubleY(int seed, double x, double y, double z)
     
    double
    randomDoubleZ(int seed, double x, double y, double z)
     
    double
    rotateX(double x, double y)
     
    double
    rotateX(double x, double y, double z)
     
    double
    rotateY(double x, double y)
     
    double
    rotateY(double x, double y, double z)
     
    double
    rotateZ(double x, double y, double z)
     
     

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • CoordinateRotator

      public CoordinateRotator(double pitch, double yaw)
  • Method Details

    • rotateX

      public double rotateX(double x, double y)
    • rotateY

      public double rotateY(double x, double y)
    • rotateX

      public double rotateX(double x, double y, double z)
    • rotateY

      public double rotateY(double x, double y, double z)
    • rotateZ

      public double rotateZ(double x, double y, double z)
    • randomDoubleX

      public double randomDoubleX(int seed, double x, double y)
      Specified by:
      randomDoubleX in interface ICoordinateRandomizer
    • randomDoubleY

      public double randomDoubleY(int seed, double x, double y)
      Specified by:
      randomDoubleY in interface ICoordinateRandomizer
    • randomDoubleX

      public double randomDoubleX(int seed, double x, double y, double z)
      Specified by:
      randomDoubleX in interface ICoordinateRandomizer
    • randomDoubleY

      public double randomDoubleY(int seed, double x, double y, double z)
      Specified by:
      randomDoubleY in interface ICoordinateRandomizer
    • randomDoubleZ

      public double randomDoubleZ(int seed, double x, double y, double z)
      Specified by:
      randomDoubleZ in interface ICoordinateRandomizer
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object
    • createRotationMatrix

      public static double[] createRotationMatrix(double pitch, double yaw)
      Returns a rotation matrix for the given pitch and yaw angles.
      Parameters:
      pitch - The pitch in radians.
      yaw - The yaw in radians.
      Returns:
      A rotation matrix for the given pitch and yaw angles.