Class NonMutatingQuaternionRotator

java.lang.Object
org.skriptlang.skript.bukkit.misc.rotation.NonMutatingQuaternionRotator
All Implemented Interfaces:
Rotator<org.joml.Quaternionf>

public class NonMutatingQuaternionRotator extends Object implements Rotator<org.joml.Quaternionf>
Rotates Quaternionfs around the X, Y, and Z axes, as well as any arbitrary axis. Supports all local axes. Returns new quaternion objects rather than mutating the input quaternion.
  • Constructor Details

    • NonMutatingQuaternionRotator

      public NonMutatingQuaternionRotator(Rotator.Axis axis, float angle)
    • NonMutatingQuaternionRotator

      public NonMutatingQuaternionRotator(Rotator.Axis axis, org.joml.Vector3f vector, float angle)
  • Method Details

    • rotate

      @Contract("_ -> new") public org.joml.Quaternionf rotate(org.joml.Quaternionf input)
      Description copied from interface: Rotator
      Rotates the input around the rotator's axis by the rotator's angle. May modify the input.
      Specified by:
      rotate in interface Rotator<org.joml.Quaternionf>