From 3bd822de5490a712fb1310dc95d6dae7a0b385ed Mon Sep 17 00:00:00 2001 From: REDxEYE Date: Sun, 24 Mar 2024 19:31:50 +0300 Subject: [PATCH] Fix matrices --- .../ui/data/viewer/model/BaseModelExporter.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/decima-ext-model-exporter/src/main/java/com/shade/decima/ui/data/viewer/model/BaseModelExporter.java b/modules/decima-ext-model-exporter/src/main/java/com/shade/decima/ui/data/viewer/model/BaseModelExporter.java index 9f67ceecf..057e694e0 100644 --- a/modules/decima-ext-model-exporter/src/main/java/com/shade/decima/ui/data/viewer/model/BaseModelExporter.java +++ b/modules/decima-ext-model-exporter/src/main/java/com/shade/decima/ui/data/viewer/model/BaseModelExporter.java @@ -23,9 +23,9 @@ protected static Matrix4d worldTransformToMatrix(@NotNull RTTIObject transform) final var col1 = ori.obj("Col1"); final var col2 = ori.obj("Col2"); return new Matrix4d( - col0.f32("X"), col1.f32("X"), col2.f32("X"), 0, - col0.f32("Y"), col1.f32("Y"), col2.f32("Y"), 0, - col0.f32("Z"), col1.f32("Z"), col2.f32("Z"), 0, + col0.f32("X"), col0.f32("Y"), col0.f32("Z"), 0, + col1.f32("X"), col1.f32("Y"), col1.f32("Z"), 0, + col2.f32("X"), col2.f32("Y"), col2.f32("Z"), 0, pos.f64("X"), pos.f64("Y"), pos.f64("Z"), 1 ); } @@ -37,10 +37,10 @@ protected static Matrix4d mat34ToMatrix(@NotNull RTTIObject object) { final RTTIObject row2 = object.obj("Row2"); return new Matrix4d( - row0.f32("X"), row0.f32("Y"), row0.f32("Z"), row0.f32("W"), - row1.f32("X"), row1.f32("Y"), row1.f32("Z"), row1.f32("W"), - row2.f32("X"), row2.f32("Y"), row2.f32("Z"), row2.f32("W"), - 0.0, 0.0, 0.0, 1.0 + row0.f32("X"), row1.f32("X"), row2.f32("X"), 0.0f, + row0.f32("Y"), row1.f32("Y"), row2.f32("Y"), 0.0f, + row0.f32("Z"), row1.f32("Z"), row2.f32("Z"), 0.0f, + row0.f32("W"), row1.f32("W"), row2.f32("W"), 1.0f ); }