Package dev.sefiraat.sefilib.misc
Class TransformationBuilder
java.lang.Object
dev.sefiraat.sefilib.misc.TransformationBuilder
This utility class provides a few handy methods to build a
Transformation.- Author:
- Sfiguz7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build theTransformation.firstRotation(RotationFace face, float angle) Set the second rotation for theTransformation.scale(float scaleX, float scaleY, float scaleZ) Set the scaling for theTransformation.secondRotation(RotationFace face, float angle) Set the second rotation for theTransformation.translation(float deltaX, float deltaY, float deltaZ) Set the translation for theTransformation.
-
Constructor Details
-
TransformationBuilder
public TransformationBuilder()
-
-
Method Details
-
firstRotation
Set the second rotation for theTransformation.- Parameters:
face- TheRotationFaceto rotate aroundangle- The angle to rotate by, in degrees
-
secondRotation
Set the second rotation for theTransformation.- Parameters:
face- TheRotationFaceto rotate aroundangle- The angle to rotate by, in degrees
-
scale
Set the scaling for theTransformation. This allows for scaling of the DisplayGroup in the X, Y and Z axis.- Parameters:
scaleX- The multiplier for the X axisscaleY- The multiplier for the Y axisscaleZ- The multiplier for the Z axis
-
translation
Set the translation for theTransformation. This allows for translation of the DisplayGroup in the X, Y and Z axis.- Parameters:
deltaX- The amount to translate in the X axisdeltaY- The amount to translate in the Y axisdeltaZ- The amount to translate in the Z axis
-
build
Build theTransformation.- Returns:
- The
Transformation
-