Class AffineTransformation

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

public final class AffineTransformation extends Object
An affine transformation is a decomposition of a 4×4 real matrix into a left rotation quaternion, a scale 3-vector, a second right rotation quaternion, and a translation 3-vector. It is also known as "TRSR" transformation, meaning "translation rotation scale rotation".

This class is immutable; its matrix is lazily decomposed upon demand.

Mappings:
Namespace Name
named net/minecraft/util/math/AffineTransformation
intermediary net/minecraft/class_4590
official j
  • Field Details Link icon

    • CODEC Link icon

      public static final com.mojang.serialization.Codec<AffineTransformation> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/util/math/AffineTransformation;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_42532 Lnet/minecraft/class_4590;field_42532:Lcom/mojang/serialization/Codec;
      official a Lj;a:Lcom/mojang/serialization/Codec;
    • ANY_CODEC Link icon

      public static final com.mojang.serialization.Codec<AffineTransformation> ANY_CODEC
      Mappings:
      Namespace Name Mixin selector
      named ANY_CODEC Lnet/minecraft/util/math/AffineTransformation;ANY_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_42533 Lnet/minecraft/class_4590;field_42533:Lcom/mojang/serialization/Codec;
      official b Lj;b:Lcom/mojang/serialization/Codec;
    • IDENTITY Link icon

      private static final AffineTransformation IDENTITY
      Mappings:
      Namespace Name Mixin selector
      named IDENTITY Lnet/minecraft/util/math/AffineTransformation;IDENTITY:Lnet/minecraft/util/math/AffineTransformation;
      intermediary field_20906 Lnet/minecraft/class_4590;field_20906:Lnet/minecraft/class_4590;
      official i Lj;i:Lj;
    • matrix Link icon

      private final Matrix4f matrix
      Mappings:
      Namespace Name Mixin selector
      named matrix Lnet/minecraft/util/math/AffineTransformation;matrix:Lorg/joml/Matrix4f;
      intermediary field_20900 Lnet/minecraft/class_4590;field_20900:Lorg/joml/Matrix4f;
      official c Lj;c:Lorg/joml/Matrix4f;
    • initialized Link icon

      private boolean initialized
      Mappings:
      Namespace Name Mixin selector
      named initialized Lnet/minecraft/util/math/AffineTransformation;initialized:Z
      intermediary field_20901 Lnet/minecraft/class_4590;field_20901:Z
      official d Lj;d:Z
    • translation Link icon

      @Nullable private @Nullable Vector3f translation
      Mappings:
      Namespace Name Mixin selector
      named translation Lnet/minecraft/util/math/AffineTransformation;translation:Lorg/joml/Vector3f;
      intermediary field_20902 Lnet/minecraft/class_4590;field_20902:Lorg/joml/Vector3f;
      official e Lj;e:Lorg/joml/Vector3f;
    • leftRotation Link icon

      @Nullable private @Nullable Quaternionf leftRotation
      Mappings:
      Namespace Name Mixin selector
      named leftRotation Lnet/minecraft/util/math/AffineTransformation;leftRotation:Lorg/joml/Quaternionf;
      intermediary field_20903 Lnet/minecraft/class_4590;field_20903:Lorg/joml/Quaternionf;
      official f Lj;f:Lorg/joml/Quaternionf;
    • scale Link icon

      @Nullable private @Nullable Vector3f scale
      Mappings:
      Namespace Name Mixin selector
      named scale Lnet/minecraft/util/math/AffineTransformation;scale:Lorg/joml/Vector3f;
      intermediary field_20904 Lnet/minecraft/class_4590;field_20904:Lorg/joml/Vector3f;
      official g Lj;g:Lorg/joml/Vector3f;
    • rightRotation Link icon

      @Nullable private @Nullable Quaternionf rightRotation
      Mappings:
      Namespace Name Mixin selector
      named rightRotation Lnet/minecraft/util/math/AffineTransformation;rightRotation:Lorg/joml/Quaternionf;
      intermediary field_20905 Lnet/minecraft/class_4590;field_20905:Lorg/joml/Quaternionf;
      official h Lj;h:Lorg/joml/Quaternionf;
  • Constructor Details Link icon

    • AffineTransformation Link icon

      public AffineTransformation(@Nullable @Nullable Matrix4f matrix)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/util/math/AffineTransformation;<init>(Lorg/joml/Matrix4f;)V
      intermediary <init> Lnet/minecraft/class_4590;<init>(Lorg/joml/Matrix4f;)V
      official <init> Lj;<init>(Lorg/joml/Matrix4f;)V
    • AffineTransformation Link icon

      public AffineTransformation(@Nullable @Nullable Vector3f translation, @Nullable @Nullable Quaternionf leftRotation, @Nullable @Nullable Vector3f scale, @Nullable @Nullable Quaternionf rightRotation)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/util/math/AffineTransformation;<init>(Lorg/joml/Vector3f;Lorg/joml/Quaternionf;Lorg/joml/Vector3f;Lorg/joml/Quaternionf;)V
      intermediary <init> Lnet/minecraft/class_4590;<init>(Lorg/joml/Vector3f;Lorg/joml/Quaternionf;Lorg/joml/Vector3f;Lorg/joml/Quaternionf;)V
      official <init> Lj;<init>(Lorg/joml/Vector3f;Lorg/joml/Quaternionf;Lorg/joml/Vector3f;Lorg/joml/Quaternionf;)V
  • Method Details Link icon

    • identity Link icon

      public static AffineTransformation identity()
      Mappings:
      Namespace Name Mixin selector
      named identity Lnet/minecraft/util/math/AffineTransformation;identity()Lnet/minecraft/util/math/AffineTransformation;
      intermediary method_22931 Lnet/minecraft/class_4590;method_22931()Lnet/minecraft/class_4590;
      official a Lj;a()Lj;
    • multiply Link icon

      public AffineTransformation multiply(AffineTransformation other)
      Mappings:
      Namespace Name Mixin selector
      named multiply Lnet/minecraft/util/math/AffineTransformation;multiply(Lnet/minecraft/util/math/AffineTransformation;)Lnet/minecraft/util/math/AffineTransformation;
      intermediary method_22933 Lnet/minecraft/class_4590;method_22933(Lnet/minecraft/class_4590;)Lnet/minecraft/class_4590;
      official a Lj;a(Lj;)Lj;
    • invert Link icon

      Mappings:
      Namespace Name Mixin selector
      named invert Lnet/minecraft/util/math/AffineTransformation;invert()Lnet/minecraft/util/math/AffineTransformation;
      intermediary method_22935 Lnet/minecraft/class_4590;method_22935()Lnet/minecraft/class_4590;
      official b Lj;b()Lj;
    • init Link icon

      private void init()
      Mappings:
      Namespace Name Mixin selector
      named init Lnet/minecraft/util/math/AffineTransformation;init()V
      intermediary method_22938 Lnet/minecraft/class_4590;method_22938()V
      official h Lj;h()V
    • setup Link icon

      private static Matrix4f setup(@Nullable @Nullable Vector3f translation, @Nullable @Nullable Quaternionf leftRotation, @Nullable @Nullable Vector3f scale, @Nullable @Nullable Quaternionf rightRotation)
      Mappings:
      Namespace Name Mixin selector
      named setup Lnet/minecraft/util/math/AffineTransformation;setup(Lorg/joml/Vector3f;Lorg/joml/Quaternionf;Lorg/joml/Vector3f;Lorg/joml/Quaternionf;)Lorg/joml/Matrix4f;
      intermediary method_22934 Lnet/minecraft/class_4590;method_22934(Lorg/joml/Vector3f;Lorg/joml/Quaternionf;Lorg/joml/Vector3f;Lorg/joml/Quaternionf;)Lorg/joml/Matrix4f;
      official a Lj;a(Lorg/joml/Vector3f;Lorg/joml/Quaternionf;Lorg/joml/Vector3f;Lorg/joml/Quaternionf;)Lorg/joml/Matrix4f;
    • getMatrix Link icon

      public Matrix4f getMatrix()
      Mappings:
      Namespace Name Mixin selector
      named getMatrix Lnet/minecraft/util/math/AffineTransformation;getMatrix()Lorg/joml/Matrix4f;
      intermediary method_22936 Lnet/minecraft/class_4590;method_22936()Lorg/joml/Matrix4f;
      official c Lj;c()Lorg/joml/Matrix4f;
    • getTranslation Link icon

      public Vector3f getTranslation()
      Mappings:
      Namespace Name Mixin selector
      named getTranslation Lnet/minecraft/util/math/AffineTransformation;getTranslation()Lorg/joml/Vector3f;
      intermediary method_35865 Lnet/minecraft/class_4590;method_35865()Lorg/joml/Vector3f;
      official d Lj;d()Lorg/joml/Vector3f;
    • getLeftRotation Link icon

      public Quaternionf getLeftRotation()
      Mappings:
      Namespace Name Mixin selector
      named getLeftRotation Lnet/minecraft/util/math/AffineTransformation;getLeftRotation()Lorg/joml/Quaternionf;
      intermediary method_22937 Lnet/minecraft/class_4590;method_22937()Lorg/joml/Quaternionf;
      official e Lj;e()Lorg/joml/Quaternionf;
    • getScale Link icon

      public Vector3f getScale()
      Mappings:
      Namespace Name Mixin selector
      named getScale Lnet/minecraft/util/math/AffineTransformation;getScale()Lorg/joml/Vector3f;
      intermediary method_35866 Lnet/minecraft/class_4590;method_35866()Lorg/joml/Vector3f;
      official f Lj;f()Lorg/joml/Vector3f;
    • getRightRotation Link icon

      public Quaternionf getRightRotation()
      Mappings:
      Namespace Name Mixin selector
      named getRightRotation Lnet/minecraft/util/math/AffineTransformation;getRightRotation()Lorg/joml/Quaternionf;
      intermediary method_35867 Lnet/minecraft/class_4590;method_35867()Lorg/joml/Quaternionf;
      official g Lj;g()Lorg/joml/Quaternionf;
    • equals Link icon

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      named equals Lnet/minecraft/util/math/AffineTransformation;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_4590;equals(Ljava/lang/Object;)Z
      official equals Lj;equals(Ljava/lang/Object;)Z
    • hashCode Link icon

      public int hashCode()
      Overrides:
      hashCode in class Object
    • interpolate Link icon

      public AffineTransformation interpolate(AffineTransformation target, float factor)
      Mappings:
      Namespace Name Mixin selector
      named interpolate Lnet/minecraft/util/math/AffineTransformation;interpolate(Lnet/minecraft/util/math/AffineTransformation;F)Lnet/minecraft/util/math/AffineTransformation;
      intermediary method_35864 Lnet/minecraft/class_4590;method_35864(Lnet/minecraft/class_4590;F)Lnet/minecraft/class_4590;
      official a Lj;a(Lj;F)Lj;