From ae6d953c6be0106fb59d3b111b954ca3c5c52f06 Mon Sep 17 00:00:00 2001 From: Jozufozu Date: Wed, 25 Aug 2021 13:15:29 -0700 Subject: [PATCH] Restore single paramater scale function - Now has default impl in TransformStack - MatrixTransformStack now only overrides xyz scale --- .../flywheel/util/transform/MatrixTransformStack.java | 5 ----- .../com/jozufozu/flywheel/util/transform/TransformStack.java | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/jozufozu/flywheel/util/transform/MatrixTransformStack.java b/src/main/java/com/jozufozu/flywheel/util/transform/MatrixTransformStack.java index 14cecf5d7..bdb07aaa9 100644 --- a/src/main/java/com/jozufozu/flywheel/util/transform/MatrixTransformStack.java +++ b/src/main/java/com/jozufozu/flywheel/util/transform/MatrixTransformStack.java @@ -36,11 +36,6 @@ public class MatrixTransformStack implements TransformStack { return this; } - @Override - public TransformStack scale(float factor) { - return this.scale(factor, factor, factor); - } - @Override public TransformStack scale(float factorX, float factorY, float factorZ) { internal.scale(factorX, factorY, factorZ); diff --git a/src/main/java/com/jozufozu/flywheel/util/transform/TransformStack.java b/src/main/java/com/jozufozu/flywheel/util/transform/TransformStack.java index 737b07441..0b155591e 100644 --- a/src/main/java/com/jozufozu/flywheel/util/transform/TransformStack.java +++ b/src/main/java/com/jozufozu/flywheel/util/transform/TransformStack.java @@ -19,6 +19,10 @@ public interface TransformStack { TransformStack pop(); + default TransformStack scale(float factor) { + return scale(factor, factor, factor); + } + default TransformStack rotate(Direction axis, float radians) { if (radians == 0) return this;