Class TransformationBuilder

java.lang.Object
dev.sefiraat.sefilib.misc.TransformationBuilder

public final class TransformationBuilder extends Object
This utility class provides a few handy methods to build a Transformation.
Author:
Sfiguz7
  • Constructor Details

    • TransformationBuilder

      public TransformationBuilder()
  • Method Details

    • firstRotation

      public TransformationBuilder firstRotation(RotationFace face, float angle)
      Set the second rotation for the Transformation.
      Parameters:
      face - The RotationFace to rotate around
      angle - The angle to rotate by, in degrees
    • secondRotation

      public TransformationBuilder secondRotation(RotationFace face, float angle)
      Set the second rotation for the Transformation.
      Parameters:
      face - The RotationFace to rotate around
      angle - The angle to rotate by, in degrees
    • scale

      public TransformationBuilder scale(float scaleX, float scaleY, float scaleZ)
      Set the scaling for the Transformation. This allows for scaling of the DisplayGroup in the X, Y and Z axis.
      Parameters:
      scaleX - The multiplier for the X axis
      scaleY - The multiplier for the Y axis
      scaleZ - The multiplier for the Z axis
    • translation

      public TransformationBuilder translation(float deltaX, float deltaY, float deltaZ)
      Set the translation for the Transformation. This allows for translation of the DisplayGroup in the X, Y and Z axis.
      Parameters:
      deltaX - The amount to translate in the X axis
      deltaY - The amount to translate in the Y axis
      deltaZ - The amount to translate in the Z axis
    • build

      public Transformation build()
      Build the Transformation.
      Returns:
      The Transformation