Package net.minecraft.client.util.math
Class MatrixStack
java.lang.Object
net.minecraft.client.util.math.MatrixStack
A stack of transformation matrices used to specify how 3D objects are
translated, scaled or
rotated in 3D space. Each entry consists of a
position matrix and its
corresponding normal matrix.
By putting matrices in a stack, a transformation can be expressed relative to another. You can push, transform, render and pop, which allows you to restore the original matrix after rendering.
An entry of identity matrix is pushed when a stack is created. This
means that a stack is
if and only if the
stack contains exactly one entry.invalid reference
empty
- Mappings:
Namespace Name named net/minecraft/client/util/math/MatrixStackintermediary net/minecraft/class_4587official fjy
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSets the top entry to be the identity matrix.booleanvoidmultiply(Quaternionfc quaternion) Applies the rotation transformation to the top entry.voidmultiply(Quaternionfc quaternion, float originX, float originY, float originZ) voidmultiplyPositionMatrix(Matrix4fc matrix) Multiplies the top position matrix with the given matrix.peek()Returns the entry at the top of this stack.voidpop()Removes the entry at the top of this stack.voidpush()Pushes a copy of the top entry onto this stack.voidscale(float x, float y, float z) Applies the scale transformation to the top entry.voidtranslate(double x, double y, double z) Applies the translation transformation to the top entry.voidtranslate(float x, float y, float z) void
-
Field Details
-
stack
- Mappings:
Namespace Name Mixin selector named stackLnet/minecraft/client/util/math/MatrixStack;stack:Ljava/util/List;intermediary field_55849Lnet/minecraft/class_4587;field_55849:Ljava/util/List;official aLfjy;a:Ljava/util/List;
-
stackDepth
private int stackDepth- Mappings:
Namespace Name Mixin selector named stackDepthLnet/minecraft/client/util/math/MatrixStack;stackDepth:Iintermediary field_55850Lnet/minecraft/class_4587;field_55850:Iofficial bLfjy;b:I
-
-
Constructor Details
-
MatrixStack
public MatrixStack()
-
-
Method Details
-
translate
public void translate(double x, double y, double z) Applies the translation transformation to the top entry.- Mappings:
Namespace Name Mixin selector named translateLnet/minecraft/client/util/math/MatrixStack;translate(DDD)Vintermediary method_22904Lnet/minecraft/class_4587;method_22904(DDD)Vofficial aLfjy;a(DDD)V
-
translate
public void translate(float x, float y, float z) - Mappings:
Namespace Name Mixin selector named translateLnet/minecraft/client/util/math/MatrixStack;translate(FFF)Vintermediary method_46416Lnet/minecraft/class_4587;method_46416(FFF)Vofficial aLfjy;a(FFF)V
-
translate
- Mappings:
Namespace Name Mixin selector named translateLnet/minecraft/client/util/math/MatrixStack;translate(Lnet/minecraft/util/math/Vec3d;)Vintermediary method_61958Lnet/minecraft/class_4587;method_61958(Lnet/minecraft/class_243;)Vofficial aLfjy;a(Lfex;)V
-
scale
public void scale(float x, float y, float z) Applies the scale transformation to the top entry.- Implementation Note:
- This does not scale the normal matrix correctly when the scaling is uniform and the scaling factor is negative.
- Mappings:
Namespace Name Mixin selector named scaleLnet/minecraft/client/util/math/MatrixStack;scale(FFF)Vintermediary method_22905Lnet/minecraft/class_4587;method_22905(FFF)Vofficial bLfjy;b(FFF)V
-
multiply
Applies the rotation transformation to the top entry.- Mappings:
Namespace Name Mixin selector named multiplyLnet/minecraft/client/util/math/MatrixStack;multiply(Lorg/joml/Quaternionfc;)Vintermediary method_22907Lnet/minecraft/class_4587;method_22907(Lorg/joml/Quaternionfc;)Vofficial aLfjy;a(Lorg/joml/Quaternionfc;)V
-
multiply
- Mappings:
Namespace Name Mixin selector named multiplyLnet/minecraft/client/util/math/MatrixStack;multiply(Lorg/joml/Quaternionfc;FFF)Vintermediary method_49278Lnet/minecraft/class_4587;method_49278(Lorg/joml/Quaternionfc;FFF)Vofficial aLfjy;a(Lorg/joml/Quaternionfc;FFF)V
-
push
public void push()Pushes a copy of the top entry onto this stack.- Mappings:
Namespace Name Mixin selector named pushLnet/minecraft/client/util/math/MatrixStack;push()Vintermediary method_22903Lnet/minecraft/class_4587;method_22903()Vofficial aLfjy;a()V
-
pop
public void pop()Removes the entry at the top of this stack.- Mappings:
Namespace Name Mixin selector named popLnet/minecraft/client/util/math/MatrixStack;pop()Vintermediary method_22909Lnet/minecraft/class_4587;method_22909()Vofficial bLfjy;b()V
-
peek
Returns the entry at the top of this stack.- Returns:
- the entry at the top of this stack
- Mappings:
Namespace Name Mixin selector named peekLnet/minecraft/client/util/math/MatrixStack;peek()Lnet/minecraft/client/util/math/MatrixStack$Entry;intermediary method_23760Lnet/minecraft/class_4587;method_23760()Lnet/minecraft/class_4587$class_4665;official cLfjy;c()Lfjy$a;
-
method_67795
public boolean method_67795()- Mappings:
Namespace Name Mixin selector named method_67795Lnet/minecraft/client/util/math/MatrixStack;method_67795()Zintermediary method_67795Lnet/minecraft/class_4587;method_67795()Zofficial dLfjy;d()Z
-
loadIdentity
public void loadIdentity()Sets the top entry to be the identity matrix.- Mappings:
Namespace Name Mixin selector named loadIdentityLnet/minecraft/client/util/math/MatrixStack;loadIdentity()Vintermediary method_34426Lnet/minecraft/class_4587;method_34426()Vofficial eLfjy;e()V
-
multiplyPositionMatrix
Multiplies the top position matrix with the given matrix.This does not update the normal matrix unlike other transformation methods.
- Mappings:
Namespace Name Mixin selector named multiplyPositionMatrixLnet/minecraft/client/util/math/MatrixStack;multiplyPositionMatrix(Lorg/joml/Matrix4fc;)Vintermediary method_34425Lnet/minecraft/class_4587;method_34425(Lorg/joml/Matrix4fc;)Vofficial aLfjy;a(Lorg/joml/Matrix4fc;)V
-