Class VectorUtils

java.lang.Object
me.emafire003.dev.particleanimationlib.util.VectorUtils

public final class VectorUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.util.math.Vec3d
    rotateVector(net.minecraft.util.math.Vec3d vector, float yawDegrees, float pitchDegrees)
    This handles non-unit vectors, with yaw and pitch instead of X,Y,Z angles.
    static net.minecraft.util.math.Vec3d
    rotateVector(net.minecraft.util.math.Vec3d vector, float angleX, float angleY, float angleZ)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VectorUtils

      public VectorUtils()
  • Method Details

    • rotateVector

      public static net.minecraft.util.math.Vec3d rotateVector(net.minecraft.util.math.Vec3d vector, float angleX, float angleY, float angleZ)
    • rotateVector

      public static net.minecraft.util.math.Vec3d rotateVector(net.minecraft.util.math.Vec3d vector, float yawDegrees, float pitchDegrees)
      This handles non-unit vectors, with yaw and pitch instead of X,Y,Z angles.

      Thanks to SexyToad!

      Parameters:
      vector - vector to rotate
      yawDegrees - yaw degrees
      pitchDegrees - pitch degrees
      Returns:
      rotated vector