From 40cfc080259b42f109fb9c16832f4ac9bcb0eaed Mon Sep 17 00:00:00 2001 From: Jozufozu Date: Fri, 20 Sep 2024 19:28:27 -0700 Subject: [PATCH] Mul-ing things over - Add missing multiply functions to TransformedInstance --- .../flywheel/lib/instance/TransformedInstance.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/common/src/lib/java/dev/engine_room/flywheel/lib/instance/TransformedInstance.java b/common/src/lib/java/dev/engine_room/flywheel/lib/instance/TransformedInstance.java index 74700e480..8bab28975 100644 --- a/common/src/lib/java/dev/engine_room/flywheel/lib/instance/TransformedInstance.java +++ b/common/src/lib/java/dev/engine_room/flywheel/lib/instance/TransformedInstance.java @@ -41,6 +41,19 @@ public TransformedInstance scale(float x, float y, float z) { return this; } + public TransformedInstance mul(Matrix4fc other) { + pose.mul(other); + return this; + } + + public TransformedInstance mul(PoseStack.Pose other) { + return mul(other.pose()); + } + + public TransformedInstance mul(PoseStack stack) { + return mul(stack.last()); + } + public TransformedInstance setTransform(Matrix4fc pose) { this.pose.set(pose); return this;