Package com.mojang.math
Class Transformation
java.lang.Object
com.mojang.math.Transformation
- All Implemented Interfaces:
ITransformationExtension
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<Transformation> private boolean
static final com.mojang.serialization.Codec
<Transformation> private static final Transformation
private org.joml.Quaternionf
private final org.joml.Matrix4f
private org.joml.Matrix3f
private org.joml.Quaternionf
private org.joml.Vector3f
private org.joml.Vector3f
-
Constructor Summary
ConstructorsConstructorDescriptionTransformation
(org.joml.Matrix4f matrix) Transformation
(org.joml.Vector3f translation, org.joml.Quaternionf leftRotation, org.joml.Vector3f scale, org.joml.Quaternionf rightRotation) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
compose
(Transformation other) private static org.joml.Matrix4f
compose
(org.joml.Vector3f translation, org.joml.Quaternionf leftRotation, org.joml.Vector3f scale, org.joml.Quaternionf rightRotation) private void
boolean
org.joml.Quaternionf
org.joml.Matrix4f
org.joml.Matrix3f
org.joml.Quaternionf
org.joml.Vector3f
getScale()
org.joml.Vector3f
int
hashCode()
static Transformation
identity()
inverse()
slerp
(Transformation transformation, float delta) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.common.extensions.ITransformationExtension
applyOrigin, blockCenterToCorner, blockCornerToCenter, isIdentity, rotateTransform, transformNormal, transformPosition
-
Field Details
-
matrix
private final org.joml.Matrix4f matrix -
CODEC
-
EXTENDED_CODEC
-
decomposed
private boolean decomposed -
translation
@Nullable private org.joml.Vector3f translation -
leftRotation
@Nullable private org.joml.Quaternionf leftRotation -
scale
@Nullable private org.joml.Vector3f scale -
rightRotation
@Nullable private org.joml.Quaternionf rightRotation -
IDENTITY
-
normalTransform
private org.joml.Matrix3f normalTransform
-
-
Constructor Details
-
Transformation
public Transformation(@Nullable org.joml.Matrix4f matrix) -
Transformation
public Transformation(@Nullable org.joml.Vector3f translation, @Nullable org.joml.Quaternionf leftRotation, @Nullable org.joml.Vector3f scale, @Nullable org.joml.Quaternionf rightRotation)
-
-
Method Details
-
identity
-
compose
-
inverse
-
ensureDecomposed
private void ensureDecomposed() -
compose
private static org.joml.Matrix4f compose(@Nullable org.joml.Vector3f translation, @Nullable org.joml.Quaternionf leftRotation, @Nullable org.joml.Vector3f scale, @Nullable org.joml.Quaternionf rightRotation) -
getMatrix
public org.joml.Matrix4f getMatrix() -
getTranslation
public org.joml.Vector3f getTranslation() -
getLeftRotation
public org.joml.Quaternionf getLeftRotation() -
getScale
public org.joml.Vector3f getScale() -
getRightRotation
public org.joml.Quaternionf getRightRotation() -
equals
-
hashCode
public int hashCode() -
getNormalMatrix
public org.joml.Matrix3f getNormalMatrix() -
checkNormalTransform
private void checkNormalTransform() -
slerp
-