Record Class CuboidRotation
java.lang.Object
java.lang.Record
net.minecraft.client.resources.model.cuboid.CuboidRotation
public record CuboidRotation(org.joml.Vector3fc origin, CuboidRotation.RotationValue value, boolean rescale, org.joml.Matrix4fc transform)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic interfacestatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.joml.Vector3fcThe field for theoriginrecord component.private final booleanThe field for therescalerecord component.private final org.joml.Matrix4fcThe field for thetransformrecord component.private final CuboidRotation.RotationValueThe field for thevaluerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCuboidRotation(org.joml.Vector3fc origin, CuboidRotation.RotationValue value, boolean rescale) CuboidRotation(org.joml.Vector3fc origin, CuboidRotation.RotationValue value, boolean rescale, org.joml.Matrix4fc transform) Creates an instance of aCuboidRotationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionprivate static org.joml.Vector3fccomputeRescale(org.joml.Matrix4fc rotation) private static org.joml.Matrix4fcomputeTransform(CuboidRotation.RotationValue value, boolean rescale) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.joml.Vector3fcorigin()Returns the value of theoriginrecord component.booleanrescale()Returns the value of therescalerecord component.private static floatscaleFactorForAxis(org.joml.Matrix4fc rotation, Direction.Axis axis, org.joml.Vector3f scratch) final StringtoString()Returns a string representation of this record class.org.joml.Matrix4fcReturns the value of thetransformrecord component.value()Returns the value of thevaluerecord component.
-
Field Details
-
origin
private final org.joml.Vector3fc originThe field for theoriginrecord component. -
value
The field for thevaluerecord component. -
rescale
private final boolean rescaleThe field for therescalerecord component. -
transform
private final org.joml.Matrix4fc transformThe field for thetransformrecord component.
-
-
Constructor Details
-
CuboidRotation
public CuboidRotation(org.joml.Vector3fc origin, CuboidRotation.RotationValue value, boolean rescale) -
CuboidRotation
public CuboidRotation(org.joml.Vector3fc origin, CuboidRotation.RotationValue value, boolean rescale, org.joml.Matrix4fc transform) Creates an instance of aCuboidRotationrecord class.- Parameters:
origin- the value for theoriginrecord componentvalue- the value for thevaluerecord componentrescale- the value for therescalerecord componenttransform- the value for thetransformrecord component
-
-
Method Details
-
computeTransform
private static org.joml.Matrix4f computeTransform(CuboidRotation.RotationValue value, boolean rescale) -
computeRescale
private static org.joml.Vector3fc computeRescale(org.joml.Matrix4fc rotation) -
scaleFactorForAxis
private static float scaleFactorForAxis(org.joml.Matrix4fc rotation, Direction.Axis axis, org.joml.Vector3f scratch) -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
origin
public org.joml.Vector3fc origin()Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
rescale
public boolean rescale()Returns the value of therescalerecord component.- Returns:
- the value of the
rescalerecord component
-
transform
public org.joml.Matrix4fc transform()Returns the value of thetransformrecord component.- Returns:
- the value of the
transformrecord component
-