Package codechicken.lib.vec
Class Matrix4
java.lang.Object
codechicken.lib.vec.ITransformation<Vector3,Transformation>
codechicken.lib.vec.Transformation
codechicken.lib.vec.Matrix4
- All Implemented Interfaces:
IVertexOperation,Copyable<Transformation>
-
Nested Class Summary
Nested classes/interfaces inherited from interface codechicken.lib.render.pipeline.IVertexOperation
IVertexOperation.VertexOperationRegistry -
Field Summary
FieldsModifier and TypeFieldDescriptiondoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubleFields inherited from class codechicken.lib.vec.Transformation
operationIndex -
Constructor Summary
ConstructorsConstructorDescriptionMatrix4()Matrix4(double[] matrix) Matrix4(double d00, double d01, double d02, double d03, double d10, double d11, double d12, double d13, double d20, double d21, double d22, double d23, double d30, double d31, double d32, double d33) Matrix4(float[] matrix) Matrix4(com.mojang.blaze3d.vertex.PoseStack stack) Matrix4(DoubleBuffer buffer) Matrix4(FloatBuffer buffer) Matrix4(org.joml.Matrix4f mat) -
Method Summary
Modifier and TypeMethodDescriptionvoidApplies this transformation to a matrix as a multiplication on the right hand side.voidApplies this transformation to vecvoidApplies this transformation to a normal (doesn't translate)copy()booleanstatic Vector3gluProject(Vector3 obj, Matrix4 modelMatrix, Matrix4 projMatrix, IntBuffer viewport) inthashCode()inverse()Attempts to invert the Transformation.leftMultiply(Matrix4 mat) voidmultMatrix(org.joml.Vector4f vec) voidsave(DoubleBuffer buff) voidsave(FloatBuffer buff) scale(double scale) scale(double x, double y, double z) set(double[] matrix) set(float[] matrix) set(com.mojang.blaze3d.vertex.PoseStack stack) set(DoubleBuffer buffer) set(FloatBuffer buffer) set(org.joml.Matrix4f mat) double[]toArrayD()float[]toArrayF()org.joml.Matrix4ftoString()translate(double x, double y, double z) translate(net.minecraft.core.Vec3i pos) Methods inherited from class codechicken.lib.vec.Transformation
at, load, operate, operationID, withMethods inherited from class codechicken.lib.vec.ITransformation
$plus$plus, isRedundant, merge
-
Field Details
-
m00
public double m00 -
m01
public double m01 -
m02
public double m02 -
m03
public double m03 -
m10
public double m10 -
m11
public double m11 -
m12
public double m12 -
m13
public double m13 -
m20
public double m20 -
m21
public double m21 -
m22
public double m22 -
m23
public double m23 -
m30
public double m30 -
m31
public double m31 -
m32
public double m32 -
m33
public double m33
-
-
Constructor Details
-
Matrix4
public Matrix4() -
Matrix4
public Matrix4(double d00, double d01, double d02, double d03, double d10, double d11, double d12, double d13, double d20, double d21, double d22, double d23, double d30, double d31, double d32, double d33) -
Matrix4
-
Matrix4
public Matrix4(float[] matrix) -
Matrix4
public Matrix4(double[] matrix) -
Matrix4
-
Matrix4
-
Matrix4
public Matrix4(org.joml.Matrix4f mat) -
Matrix4
public Matrix4(com.mojang.blaze3d.vertex.PoseStack stack)
-
-
Method Details
-
setIdentity
-
translate
-
translate
-
translate
-
scale
-
scale
-
scale
-
transpose
-
rotate
-
rotate
-
leftMultiply
-
multiply
-
multMatrix
public void multMatrix(org.joml.Vector4f vec) -
set
-
set
-
set
-
set
-
set
-
set
-
set
-
copy
-
toArrayF
public float[] toArrayF() -
toArrayD
public double[] toArrayD() -
toFloatBuffer
-
save
-
toDoubleBuffer
-
save
-
toMatrix4f
public org.joml.Matrix4f toMatrix4f() -
gluProject
-
apply
Description copied from class:TransformationApplies this transformation to a matrix as a multiplication on the right hand side.- Specified by:
applyin classTransformation- Parameters:
mat- The matrix to combine this transformation with
-
apply
Description copied from class:ITransformationApplies this transformation to vec- Specified by:
applyin classITransformation<Vector3,Transformation>
-
applyN
Description copied from class:TransformationApplies this transformation to a normal (doesn't translate)- Specified by:
applyNin classTransformation- Parameters:
vec- The normal to transform
-
apply
-
inverse
Description copied from class:ITransformationAttempts to invert the Transformation.The transformations inverse may be itself, or the transform may not have an inverse. In that case a
IrreversibleTransformationExceptionis thrown.- Specified by:
inversein classITransformation<Vector3,Transformation> - Returns:
- The inverse transform.
-
hashCode
public int hashCode() -
equals
-
toString
-