Class DexTransformation

java.lang.Object
me.c7dev.dexterity.util.DexTransformation

public class DexTransformation extends Object
Provides a factory for the Transformation class
  • Constructor Details

    • DexTransformation

      public DexTransformation()
    • DexTransformation

      public DexTransformation(Transformation trans)
  • Method Details

    • clone

      public DexTransformation clone()
    • newDefaultTransformation

      public static DexTransformation newDefaultTransformation()
      Returns a transformation set so that the scale is 1 and location is in the block center
      Returns:
    • newEmptyTransformation

      public static DexTransformation newEmptyTransformation()
      Returns a transformation set so that the scale is 1 and translation is 0 (the block display's corner)
      Returns:
    • getScale

      public Vector getScale()
    • getDisplacement

      public Vector getDisplacement()
    • getLeftRotation

      public org.joml.Quaternionf getLeftRotation()
    • getRightRotation

      public org.joml.Quaternionf getRightRotation()
    • getRollOffset

      public Vector getRollOffset()
    • rescale

      public DexTransformation rescale(Vector s)
      Sets the scale to the input Vector and resets the displacement Creates an easy way to set scale and keep the block display centered
      Parameters:
      s -
      Returns:
    • setScale

      public DexTransformation setScale(Vector s)
    • setScale

      public DexTransformation setScale(float x, float y, float z)
    • setDisplacement

      public DexTransformation setDisplacement(Vector d)
    • setDisplacement

      public DexTransformation setDisplacement(float x, float y, float z)
    • setLeftRotation

      public DexTransformation setLeftRotation(org.joml.Quaternionf lr)
    • setRightRotation

      public DexTransformation setRightRotation(org.joml.Quaternionf rr)
    • setRollOffset

      public DexTransformation setRollOffset(Vector v)
    • build

      public Transformation build()