Package net.minecraft.util.math
Class Matrix4f
java.lang.Object
net.minecraft.util.math.Matrix4f
- Mappings:
Namespace Name official d
intermediary net/minecraft/class_1159
named net/minecraft/util/math/Matrix4f
-
Field Summary
Modifier and TypeFieldDescriptionprotected float
protected float
protected float
protected float
protected float
protected float
protected float
protected float
protected float
protected float
protected float
protected float
protected float
protected float
protected float
protected float
private static final int
The number of rows and columns (4) this matrix has. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addToLastColumn
(Vec3f vector) copy()
float
float
boolean
int
hashCode()
boolean
invert()
private static boolean
isInteger
(float value) void
void
boolean
void
multiply
(float scalar) void
void
multiply
(Quaternion quaternion) void
multiplyByTranslation
(float x, float y, float z) Multiplies the matrix by the translation matrix consisting ofx
,y
andz
.private static int
pack
(int x, int y) static Matrix4f
projectionMatrix
(float width, float height, float nearPlane, float farPlane) static Matrix4f
projectionMatrix
(float left, float right, float bottom, float top, float nearPlane, float farPlane) void
read
(FloatBuffer buf, boolean rowMajor) Reads a matrix from the buffer.void
Reads a matrix from the buffer in column-major order.void
readRowMajor
(FloatBuffer buf) Reads a matrix from the buffer in row-major order.static Matrix4f
scale
(float x, float y, float z) void
toString()
float
trace()
Returns the sum of the elements on the main diagonal.static Matrix4f
translate
(float x, float y, float z) void
static Matrix4f
viewboxMatrix
(double fov, float aspectRatio, float cameraDepth, float viewDistance) void
write
(FloatBuffer buf, boolean rowMajor) Writes this matrix to the buffer.void
Writes this matrix to the buffer in column-major order.void
writeRowMajor
(FloatBuffer buf) Writes this matrix to the buffer in row-major order.
-
Field Details
-
ORDER
private static final int ORDERThe number of rows and columns (4) this matrix has.- See Also:
- Mappings:
Namespace Name Mixin selector official q
Ld;q:I
intermediary field_31601
Lnet/minecraft/class_1159;field_31601:I
named ORDER
Lnet/minecraft/util/math/Matrix4f;ORDER:I
-
a00
protected float a00- Mappings:
Namespace Name Mixin selector official a
Ld;a:F
intermediary field_21652
Lnet/minecraft/class_1159;field_21652:F
named a00
Lnet/minecraft/util/math/Matrix4f;a00:F
-
a01
protected float a01- Mappings:
Namespace Name Mixin selector official b
Ld;b:F
intermediary field_21653
Lnet/minecraft/class_1159;field_21653:F
named a01
Lnet/minecraft/util/math/Matrix4f;a01:F
-
a02
protected float a02- Mappings:
Namespace Name Mixin selector official c
Ld;c:F
intermediary field_21654
Lnet/minecraft/class_1159;field_21654:F
named a02
Lnet/minecraft/util/math/Matrix4f;a02:F
-
a03
protected float a03- Mappings:
Namespace Name Mixin selector official d
Ld;d:F
intermediary field_21655
Lnet/minecraft/class_1159;field_21655:F
named a03
Lnet/minecraft/util/math/Matrix4f;a03:F
-
a10
protected float a10- Mappings:
Namespace Name Mixin selector official e
Ld;e:F
intermediary field_21656
Lnet/minecraft/class_1159;field_21656:F
named a10
Lnet/minecraft/util/math/Matrix4f;a10:F
-
a11
protected float a11- Mappings:
Namespace Name Mixin selector official f
Ld;f:F
intermediary field_21657
Lnet/minecraft/class_1159;field_21657:F
named a11
Lnet/minecraft/util/math/Matrix4f;a11:F
-
a12
protected float a12- Mappings:
Namespace Name Mixin selector official g
Ld;g:F
intermediary field_21658
Lnet/minecraft/class_1159;field_21658:F
named a12
Lnet/minecraft/util/math/Matrix4f;a12:F
-
a13
protected float a13- Mappings:
Namespace Name Mixin selector official h
Ld;h:F
intermediary field_21659
Lnet/minecraft/class_1159;field_21659:F
named a13
Lnet/minecraft/util/math/Matrix4f;a13:F
-
a20
protected float a20- Mappings:
Namespace Name Mixin selector official i
Ld;i:F
intermediary field_21660
Lnet/minecraft/class_1159;field_21660:F
named a20
Lnet/minecraft/util/math/Matrix4f;a20:F
-
a21
protected float a21- Mappings:
Namespace Name Mixin selector official j
Ld;j:F
intermediary field_21661
Lnet/minecraft/class_1159;field_21661:F
named a21
Lnet/minecraft/util/math/Matrix4f;a21:F
-
a22
protected float a22- Mappings:
Namespace Name Mixin selector official k
Ld;k:F
intermediary field_21662
Lnet/minecraft/class_1159;field_21662:F
named a22
Lnet/minecraft/util/math/Matrix4f;a22:F
-
a23
protected float a23- Mappings:
Namespace Name Mixin selector official l
Ld;l:F
intermediary field_21663
Lnet/minecraft/class_1159;field_21663:F
named a23
Lnet/minecraft/util/math/Matrix4f;a23:F
-
a30
protected float a30- Mappings:
Namespace Name Mixin selector official m
Ld;m:F
intermediary field_21664
Lnet/minecraft/class_1159;field_21664:F
named a30
Lnet/minecraft/util/math/Matrix4f;a30:F
-
a31
protected float a31- Mappings:
Namespace Name Mixin selector official n
Ld;n:F
intermediary field_21665
Lnet/minecraft/class_1159;field_21665:F
named a31
Lnet/minecraft/util/math/Matrix4f;a31:F
-
a32
protected float a32- Mappings:
Namespace Name Mixin selector official o
Ld;o:F
intermediary field_21666
Lnet/minecraft/class_1159;field_21666:F
named a32
Lnet/minecraft/util/math/Matrix4f;a32:F
-
a33
protected float a33- Mappings:
Namespace Name Mixin selector official p
Ld;p:F
intermediary field_21667
Lnet/minecraft/class_1159;field_21667:F
named a33
Lnet/minecraft/util/math/Matrix4f;a33:F
-
-
Constructor Details
-
Matrix4f
public Matrix4f() -
Matrix4f
- Mappings:
Namespace Name Mixin selector official <init>
Ld;<init>(Ld;)V
intermediary <init>
Lnet/minecraft/class_1159;<init>(Lnet/minecraft/class_1159;)V
named <init>
Lnet/minecraft/util/math/Matrix4f;<init>(Lnet/minecraft/util/math/Matrix4f;)V
-
Matrix4f
- Mappings:
Namespace Name Mixin selector official <init>
Ld;<init>(Lg;)V
intermediary <init>
Lnet/minecraft/class_1159;<init>(Lnet/minecraft/class_1158;)V
named <init>
Lnet/minecraft/util/math/Matrix4f;<init>(Lnet/minecraft/util/math/Quaternion;)V
-
-
Method Details
-
method_35433
public boolean method_35433()- Mappings:
Namespace Name Mixin selector official a
Ld;a()Z
intermediary method_35433
Lnet/minecraft/class_1159;method_35433()Z
named method_35433
Lnet/minecraft/util/math/Matrix4f;method_35433()Z
-
isInteger
private static boolean isInteger(float value) - Mappings:
Namespace Name Mixin selector official b
Ld;b(F)Z
intermediary method_35437
Lnet/minecraft/class_1159;method_35437(F)Z
named isInteger
Lnet/minecraft/util/math/Matrix4f;isInteger(F)Z
-
equals
-
hashCode
public int hashCode() -
pack
private static int pack(int x, int y) - Mappings:
Namespace Name Mixin selector official a
Ld;a(II)I
intermediary method_24020
Lnet/minecraft/class_1159;method_24020(II)I
named pack
Lnet/minecraft/util/math/Matrix4f;pack(II)I
-
readColumnMajor
Reads a matrix from the buffer in column-major order.- See Also:
- Mappings:
Namespace Name Mixin selector official a
Ld;a(Ljava/nio/FloatBuffer;)V
intermediary method_35435
Lnet/minecraft/class_1159;method_35435(Ljava/nio/FloatBuffer;)V
named readColumnMajor
Lnet/minecraft/util/math/Matrix4f;readColumnMajor(Ljava/nio/FloatBuffer;)V
-
readRowMajor
Reads a matrix from the buffer in row-major order.- See Also:
- Mappings:
Namespace Name Mixin selector official b
Ld;b(Ljava/nio/FloatBuffer;)V
intermediary method_35438
Lnet/minecraft/class_1159;method_35438(Ljava/nio/FloatBuffer;)V
named readRowMajor
Lnet/minecraft/util/math/Matrix4f;readRowMajor(Ljava/nio/FloatBuffer;)V
-
read
Reads a matrix from the buffer.- Parameters:
rowMajor
-true
to read in row-major order;false
to read in column-major order- See Also:
- Mappings:
Namespace Name Mixin selector official a
Ld;a(Ljava/nio/FloatBuffer;Z)V
intermediary method_35436
Lnet/minecraft/class_1159;method_35436(Ljava/nio/FloatBuffer;Z)V
named read
Lnet/minecraft/util/math/Matrix4f;read(Ljava/nio/FloatBuffer;Z)V
-
load
- Mappings:
Namespace Name Mixin selector official a
Ld;a(Ld;)V
intermediary method_35434
Lnet/minecraft/class_1159;method_35434(Lnet/minecraft/class_1159;)V
named load
Lnet/minecraft/util/math/Matrix4f;load(Lnet/minecraft/util/math/Matrix4f;)V
-
toString
-
writeColumnMajor
Writes this matrix to the buffer in column-major order.- See Also:
- Mappings:
Namespace Name Mixin selector official c
Ld;c(Ljava/nio/FloatBuffer;)V
intermediary method_4932
Lnet/minecraft/class_1159;method_4932(Ljava/nio/FloatBuffer;)V
named writeColumnMajor
Lnet/minecraft/util/math/Matrix4f;writeColumnMajor(Ljava/nio/FloatBuffer;)V
-
writeRowMajor
Writes this matrix to the buffer in row-major order.- See Also:
- Mappings:
Namespace Name Mixin selector official d
Ld;d(Ljava/nio/FloatBuffer;)V
intermediary method_35443
Lnet/minecraft/class_1159;method_35443(Ljava/nio/FloatBuffer;)V
named writeRowMajor
Lnet/minecraft/util/math/Matrix4f;writeRowMajor(Ljava/nio/FloatBuffer;)V
-
write
Writes this matrix to the buffer.- Parameters:
rowMajor
-true
to write in row-major order;false
to write in column-major order- See Also:
- Mappings:
Namespace Name Mixin selector official b
Ld;b(Ljava/nio/FloatBuffer;Z)V
intermediary method_35439
Lnet/minecraft/class_1159;method_35439(Ljava/nio/FloatBuffer;Z)V
named write
Lnet/minecraft/util/math/Matrix4f;write(Ljava/nio/FloatBuffer;Z)V
-
loadIdentity
public void loadIdentity()- Mappings:
Namespace Name Mixin selector official b
Ld;b()V
intermediary method_22668
Lnet/minecraft/class_1159;method_22668()V
named loadIdentity
Lnet/minecraft/util/math/Matrix4f;loadIdentity()V
-
determinantAndAdjugate
public float determinantAndAdjugate()- Mappings:
Namespace Name Mixin selector official c
Ld;c()F
intermediary method_22868
Lnet/minecraft/class_1159;method_22868()F
named determinantAndAdjugate
Lnet/minecraft/util/math/Matrix4f;determinantAndAdjugate()F
-
determinant
public float determinant()- Mappings:
Namespace Name Mixin selector official d
Ld;d()F
intermediary method_35441
Lnet/minecraft/class_1159;method_35441()F
named determinant
Lnet/minecraft/util/math/Matrix4f;determinant()F
-
transpose
public void transpose()- Mappings:
Namespace Name Mixin selector official e
Ld;e()V
intermediary method_22871
Lnet/minecraft/class_1159;method_22871()V
named transpose
Lnet/minecraft/util/math/Matrix4f;transpose()V
-
invert
public boolean invert()- Mappings:
Namespace Name Mixin selector official f
Ld;f()Z
intermediary method_22870
Lnet/minecraft/class_1159;method_22870()Z
named invert
Lnet/minecraft/util/math/Matrix4f;invert()Z
-
multiply
- Mappings:
Namespace Name Mixin selector official b
Ld;b(Ld;)V
intermediary method_22672
Lnet/minecraft/class_1159;method_22672(Lnet/minecraft/class_1159;)V
named multiply
Lnet/minecraft/util/math/Matrix4f;multiply(Lnet/minecraft/util/math/Matrix4f;)V
-
multiply
- Mappings:
Namespace Name Mixin selector official a
Ld;a(Lg;)V
intermediary method_22670
Lnet/minecraft/class_1159;method_22670(Lnet/minecraft/class_1158;)V
named multiply
Lnet/minecraft/util/math/Matrix4f;multiply(Lnet/minecraft/util/math/Quaternion;)V
-
multiply
public void multiply(float scalar) - Mappings:
Namespace Name Mixin selector official a
Ld;a(F)V
intermediary method_22866
Lnet/minecraft/class_1159;method_22866(F)V
named multiply
Lnet/minecraft/util/math/Matrix4f;multiply(F)V
-
add
- Mappings:
Namespace Name Mixin selector official c
Ld;c(Ld;)V
intermediary method_35440
Lnet/minecraft/class_1159;method_35440(Lnet/minecraft/class_1159;)V
named add
Lnet/minecraft/util/math/Matrix4f;add(Lnet/minecraft/util/math/Matrix4f;)V
-
subtract
- Mappings:
Namespace Name Mixin selector official d
Ld;d(Ld;)V
intermediary method_35442
Lnet/minecraft/class_1159;method_35442(Lnet/minecraft/class_1159;)V
named subtract
Lnet/minecraft/util/math/Matrix4f;subtract(Lnet/minecraft/util/math/Matrix4f;)V
-
trace
public float trace()Returns the sum of the elements on the main diagonal.- Mappings:
Namespace Name Mixin selector official g
Ld;g()F
intermediary method_35444
Lnet/minecraft/class_1159;method_35444()F
named trace
Lnet/minecraft/util/math/Matrix4f;trace()F
-
viewboxMatrix
public static Matrix4f viewboxMatrix(double fov, float aspectRatio, float cameraDepth, float viewDistance) - Mappings:
Namespace Name Mixin selector official a
Ld;a(DFFF)Ld;
intermediary method_4929
Lnet/minecraft/class_1159;method_4929(DFFF)Lnet/minecraft/class_1159;
named viewboxMatrix
Lnet/minecraft/util/math/Matrix4f;viewboxMatrix(DFFF)Lnet/minecraft/util/math/Matrix4f;
-
projectionMatrix
- Mappings:
Namespace Name Mixin selector official a
Ld;a(FFFF)Ld;
intermediary method_4933
Lnet/minecraft/class_1159;method_4933(FFFF)Lnet/minecraft/class_1159;
named projectionMatrix
Lnet/minecraft/util/math/Matrix4f;projectionMatrix(FFFF)Lnet/minecraft/util/math/Matrix4f;
-
projectionMatrix
public static Matrix4f projectionMatrix(float left, float right, float bottom, float top, float nearPlane, float farPlane) - Mappings:
Namespace Name Mixin selector official a
Ld;a(FFFFFF)Ld;
intermediary method_34239
Lnet/minecraft/class_1159;method_34239(FFFFFF)Lnet/minecraft/class_1159;
named projectionMatrix
Lnet/minecraft/util/math/Matrix4f;projectionMatrix(FFFFFF)Lnet/minecraft/util/math/Matrix4f;
-
addToLastColumn
- Mappings:
Namespace Name Mixin selector official a
Ld;a(Lk;)V
intermediary method_22671
Lnet/minecraft/class_1159;method_22671(Lnet/minecraft/class_1160;)V
named addToLastColumn
Lnet/minecraft/util/math/Matrix4f;addToLastColumn(Lnet/minecraft/util/math/Vec3f;)V
-
copy
- Mappings:
Namespace Name Mixin selector official h
Ld;h()Ld;
intermediary method_22673
Lnet/minecraft/class_1159;method_22673()Lnet/minecraft/class_1159;
named copy
Lnet/minecraft/util/math/Matrix4f;copy()Lnet/minecraft/util/math/Matrix4f;
-
multiplyByTranslation
public void multiplyByTranslation(float x, float y, float z) Multiplies the matrix by the translation matrix consisting ofx
,y
andz
.multiplyByTranslation(x, y, z)
is equivalent tomultiply(Matrix4f.translate(x, y, z))
.- Mappings:
Namespace Name Mixin selector official a
Ld;a(FFF)V
intermediary method_31544
Lnet/minecraft/class_1159;method_31544(FFF)V
named multiplyByTranslation
Lnet/minecraft/util/math/Matrix4f;multiplyByTranslation(FFF)V
-
scale
- Mappings:
Namespace Name Mixin selector official b
Ld;b(FFF)Ld;
intermediary method_24019
Lnet/minecraft/class_1159;method_24019(FFF)Lnet/minecraft/class_1159;
named scale
Lnet/minecraft/util/math/Matrix4f;scale(FFF)Lnet/minecraft/util/math/Matrix4f;
-
translate
- Mappings:
Namespace Name Mixin selector official c
Ld;c(FFF)Ld;
intermediary method_24021
Lnet/minecraft/class_1159;method_24021(FFF)Lnet/minecraft/class_1159;
named translate
Lnet/minecraft/util/math/Matrix4f;translate(FFF)Lnet/minecraft/util/math/Matrix4f;
-