Class PoseStackMixin
java.lang.Object
foundry.veil.mixin.client.pipeline.PoseStackMixin
- All Implemented Interfaces:
MatrixStack
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyScale
(float x, float y, float z) Scales the position and normal by the specified amount in the x, y, and z.void
clear()
Clears all transformations.boolean
isEmpty()
boolean
abstract com.mojang.blaze3d.vertex.PoseStack.Pose
last()
void
Restores a previous position and normal set withMatrixStack.matrixPush()
.void
Saves the current position and normal transformation for restoring later withMatrixStack.matrixPop()
.com.mojang.blaze3d.vertex.PoseStack.Pose
pose()
void
rotate
(float angle, float x, float y, float z) Rotates the position and normal by the specified angle about the line specified by x, y, z.void
rotate
(org.joml.Quaterniondc rotation) Rotates the position and normal by the specified quaternion rotation.void
rotate
(org.joml.Quaternionfc rotation) Rotates the position and normal by the specified quaternion rotation.void
rotateAround
(org.joml.Quaterniondc rotation, double x, double y, double z) Rotates the position and normal by the specified quaternion rotation about the specified rotation point.void
rotateAround
(org.joml.Quaternionfc rotation, float x, float y, float z) Rotates the position and normal by the specified quaternion rotation about the specified rotation point.void
rotateXYZ
(float x, float y, float z) Rotates about the x, y, then z planes the specified angles.void
rotateZYX
(float z, float y, float x) Rotates about the z, y, then x planes the specified angles.abstract void
shadow$mulPose
(org.joml.Quaternionf quaternion) abstract void
abstract void
abstract void
shadow$rotateAround
(org.joml.Quaternionf quaternion, float x, float y, float z) abstract void
shadow$scale
(float x, float y, float z) com.mojang.blaze3d.vertex.PoseStack
void
translate
(float x, float y, float z) Translates the position by the specified amount.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface foundry.veil.api.client.render.MatrixStack
applyScale, applyScale, applyScale, copy, copy, copy, normal, position, rotate, rotateXYZ, rotateZYX, setIdentity, translate
-
Constructor Details
-
PoseStackMixin
public PoseStackMixin()
-
-
Method Details
-
shadow$scale
public abstract void shadow$scale(float x, float y, float z) -
shadow$mulPose
public abstract void shadow$mulPose(org.joml.Quaternionf quaternion) -
shadow$rotateAround
public abstract void shadow$rotateAround(org.joml.Quaternionf quaternion, float x, float y, float z) -
shadow$pushPose
public abstract void shadow$pushPose() -
shadow$popPose
public abstract void shadow$popPose() -
last
public abstract com.mojang.blaze3d.vertex.PoseStack.Pose last() -
clear
public void clear()Description copied from interface:MatrixStack
Clears all transformations.- Specified by:
clear
in interfaceMatrixStack
-
translate
public void translate(float x, float y, float z) Description copied from interface:MatrixStack
Translates the position by the specified amount.- Specified by:
translate
in interfaceMatrixStack
- Parameters:
x
- The x amounty
- The y amountz
- The z amount
-
rotate
public void rotate(org.joml.Quaterniondc rotation) Description copied from interface:MatrixStack
Rotates the position and normal by the specified quaternion rotation.- Specified by:
rotate
in interfaceMatrixStack
- Parameters:
rotation
- The rotation to use
-
rotate
public void rotate(org.joml.Quaternionfc rotation) Description copied from interface:MatrixStack
Rotates the position and normal by the specified quaternion rotation.- Specified by:
rotate
in interfaceMatrixStack
- Parameters:
rotation
- The rotation to use
-
rotate
public void rotate(float angle, float x, float y, float z) Description copied from interface:MatrixStack
Rotates the position and normal by the specified angle about the line specified by x, y, z.
For rotating along all 3 axes, use
MatrixStack.rotateXYZ(float, float, float)
orMatrixStack.rotateZYX(float, float, float)
.- Specified by:
rotate
in interfaceMatrixStack
- Parameters:
angle
- The amount to rotate in radiansx
- The x normaly
- The y normalz
- The z normal
-
rotateXYZ
public void rotateXYZ(float x, float y, float z) Description copied from interface:MatrixStack
Rotates about the x, y, then z planes the specified angles.- Specified by:
rotateXYZ
in interfaceMatrixStack
- Parameters:
x
- The amount to rotate in the x in radiansy
- The amount to rotate in the y in radiansz
- The amount to rotate in the z in radians
-
rotateZYX
public void rotateZYX(float z, float y, float x) Description copied from interface:MatrixStack
Rotates about the z, y, then x planes the specified angles.- Specified by:
rotateZYX
in interfaceMatrixStack
- Parameters:
z
- The amount to rotate in the x in radiansy
- The amount to rotate in the y in radiansx
- The amount to rotate in the z in radians
-
rotateAround
public void rotateAround(org.joml.Quaterniondc rotation, double x, double y, double z) Description copied from interface:MatrixStack
Rotates the position and normal by the specified quaternion rotation about the specified rotation point.- Specified by:
rotateAround
in interfaceMatrixStack
- Parameters:
rotation
- The rotation to usex
- The rotation point Xy
- The rotation point Yz
- The rotation point Z
-
rotateAround
public void rotateAround(org.joml.Quaternionfc rotation, float x, float y, float z) Description copied from interface:MatrixStack
Rotates the position and normal by the specified quaternion rotation about the specified rotation point.- Specified by:
rotateAround
in interfaceMatrixStack
- Parameters:
rotation
- The rotation to usex
- The rotation point Xy
- The rotation point Yz
- The rotation point Z
-
applyScale
public void applyScale(float x, float y, float z) Description copied from interface:MatrixStack
Scales the position and normal by the specified amount in the x, y, and z.- Specified by:
applyScale
in interfaceMatrixStack
- Parameters:
x
- The x scale factory
- The y scale factorz
- The z scale factor
-
isIdentity
public boolean isIdentity()- Specified by:
isIdentity
in interfaceMatrixStack
- Returns:
- Whether the
MatrixStack.position()
andMatrixStack.normal()
are identity matrices
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceMatrixStack
- Returns:
- Whether there are no more transformations to pop
-
matrixPush
public void matrixPush()Description copied from interface:MatrixStack
Saves the current position and normal transformation for restoring later withMatrixStack.matrixPop()
.- Specified by:
matrixPush
in interfaceMatrixStack
-
matrixPop
public void matrixPop()Description copied from interface:MatrixStack
Restores a previous position and normal set withMatrixStack.matrixPush()
.- Specified by:
matrixPop
in interfaceMatrixStack
-
pose
public com.mojang.blaze3d.vertex.PoseStack.Pose pose()- Specified by:
pose
in interfaceMatrixStack
- Returns:
- The last pose in the stack
-
toPoseStack
public com.mojang.blaze3d.vertex.PoseStack toPoseStack()- Specified by:
toPoseStack
in interfaceMatrixStack
- Returns:
- This matrix stack as a vanilla mc
PoseStack
-