Class Transform

java.lang.Object
dev.zwazel.internal.game.transform.Transform

public class Transform extends Object
Represents a 3D transformation in space.
  • Constructor Details

    • Transform

      public Transform(double[] translation, double[] rotation, double[] scale)
      Constructs a new Transform with the given translation, rotation, and scale. This constructor is used by Jackson to deserialize a Transform from JSON.
      Parameters:
      translation - The translation component of the transformation as an array of 3 doubles.
      rotation - The rotation component of the transformation as an array of 4 doubles.
      scale - The scale component of the transformation as an array of 3 doubles.
    • Transform

      public Transform(Vec3 translation, Quaternion rotation)
      Constructs a new Transform from the given translation and rotation. The scale component of the transformation is set to (1, 1, 1).
      Parameters:
      translation - The translation component of the transformation.
      rotation - The rotation component of the transformation.
  • Method Details

    • combineTransforms

      public static Transform combineTransforms(Transform parent, Transform child)
    • left

      public Vec3 left()
    • right

      public Vec3 right()
    • up

      public Vec3 up()
    • down

      public Vec3 down()
    • forward

      public Vec3 forward()
    • backward

      public Vec3 backward()