Class MatrixUtil

java.lang.Object
net.minecraft.util.math.MatrixUtil

public class MatrixUtil extends Object
Mappings:
Namespace Name
official e
intermediary net/minecraft/class_7837
named net/minecraft/util/math/MatrixUtil
  • Field Details

    • COT_PI_OVER_8

      private static final float COT_PI_OVER_8
      Mappings:
      Namespace Name Mixin selector
      official a Le;a:F
      intermediary field_40746 Lnet/minecraft/class_7837;field_40746:F
      named COT_PI_OVER_8 Lnet/minecraft/util/math/MatrixUtil;COT_PI_OVER_8:F
    • COS_PI_OVER_8

      private static final float COS_PI_OVER_8
      Mappings:
      Namespace Name Mixin selector
      official b Le;b:F
      intermediary field_40747 Lnet/minecraft/class_7837;field_40747:F
      named COS_PI_OVER_8 Lnet/minecraft/util/math/MatrixUtil;COS_PI_OVER_8:F
    • SIN_PI_OVER_8

      private static final float SIN_PI_OVER_8
      Mappings:
      Namespace Name Mixin selector
      official c Le;c:F
      intermediary field_40748 Lnet/minecraft/class_7837;field_40748:F
      named SIN_PI_OVER_8 Lnet/minecraft/util/math/MatrixUtil;SIN_PI_OVER_8:F
  • Constructor Details

    • MatrixUtil

      private MatrixUtil()
  • Method Details

    • scale

      public static Matrix4f scale(Matrix4f matrix, float scalar)
      Mappings:
      Namespace Name Mixin selector
      official a Le;a(Lorg/joml/Matrix4f;F)Lorg/joml/Matrix4f;
      intermediary method_46414 Lnet/minecraft/class_7837;method_46414(Lorg/joml/Matrix4f;F)Lorg/joml/Matrix4f;
      named scale Lnet/minecraft/util/math/MatrixUtil;scale(Lorg/joml/Matrix4f;F)Lorg/joml/Matrix4f;
    • approximateGivensQuaternion

      private static com.mojang.datafixers.util.Pair<Float,Float> approximateGivensQuaternion(float a11, float a12, float a22)
      Computes the approximate Givens rotation factors (c, s) = (cos(phi), sin(phi)) for a 2×2 matrix. See Algorithm 4 of https://pages.cs.wisc.edu/~sifakis/papers/SVD_TR1690.pdf.
      Parameters:
      a11 - the top-left element of the matrix
      a12 - the average of the two elements on the minor diagonal
      a22 - the bottom-right element of the matrix
      Returns:
      a pair (c, s) = (cos(theta), sin(theta))
      Mappings:
      Namespace Name Mixin selector
      official a Le;a(FFF)Lcom/mojang/datafixers/util/Pair;
      intermediary method_46411 Lnet/minecraft/class_7837;method_46411(FFF)Lcom/mojang/datafixers/util/Pair;
      named approximateGivensQuaternion Lnet/minecraft/util/math/MatrixUtil;approximateGivensQuaternion(FFF)Lcom/mojang/datafixers/util/Pair;
    • qrGivensQuaternion

      private static com.mojang.datafixers.util.Pair<Float,Float> qrGivensQuaternion(float a1, float a2)
      Computes the Givens quaternion for a QR factorization. See Algorithm 4 of https://pages.cs.wisc.edu/~sifakis/papers/SVD_TR1690.pdf.
      Returns:
      a pair (c, s) = (cos(theta), sin(theta))
      Mappings:
      Namespace Name Mixin selector
      official a Le;a(FF)Lcom/mojang/datafixers/util/Pair;
      intermediary method_46410 Lnet/minecraft/class_7837;method_46410(FF)Lcom/mojang/datafixers/util/Pair;
      named qrGivensQuaternion Lnet/minecraft/util/math/MatrixUtil;qrGivensQuaternion(FF)Lcom/mojang/datafixers/util/Pair;
    • applyJacobiIteration

      private static Quaternionf applyJacobiIteration(Matrix3f S)
      Mappings:
      Namespace Name Mixin selector
      official b Le;b(Lorg/joml/Matrix3f;)Lorg/joml/Quaternionf;
      intermediary method_46415 Lnet/minecraft/class_7837;method_46415(Lorg/joml/Matrix3f;)Lorg/joml/Quaternionf;
      named applyJacobiIteration Lnet/minecraft/util/math/MatrixUtil;applyJacobiIteration(Lorg/joml/Matrix3f;)Lorg/joml/Quaternionf;
    • svdDecompose

      public static Triple<Quaternionf,Vector3f,Quaternionf> svdDecompose(Matrix3f A)
      Performs an approximate singular value decomposition on a 3×3 matrix. See Algorithm 4 of https://pages.cs.wisc.edu/~sifakis/papers/SVD_TR1690.pdf.
      Mappings:
      Namespace Name Mixin selector
      official a Le;a(Lorg/joml/Matrix3f;)Lorg/apache/commons/lang3/tuple/Triple;
      intermediary method_46412 Lnet/minecraft/class_7837;method_46412(Lorg/joml/Matrix3f;)Lorg/apache/commons/lang3/tuple/Triple;
      named svdDecompose Lnet/minecraft/util/math/MatrixUtil;svdDecompose(Lorg/joml/Matrix3f;)Lorg/apache/commons/lang3/tuple/Triple;
    • affineTransform

      public static Matrix4x3f affineTransform(Matrix4f matrix)
      Mappings:
      Namespace Name Mixin selector
      official a Le;a(Lorg/joml/Matrix4f;)Lorg/joml/Matrix4x3f;
      intermediary method_46413 Lnet/minecraft/class_7837;method_46413(Lorg/joml/Matrix4f;)Lorg/joml/Matrix4x3f;
      named affineTransform Lnet/minecraft/util/math/MatrixUtil;affineTransform(Lorg/joml/Matrix4f;)Lorg/joml/Matrix4x3f;