From e5199940b882816a8753c03450014feb41f54df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ria=20Koc=C3=BArekov=C3=A1?= <xkocure1@fi.muni.cz> Date: Fri, 30 Apr 2021 10:27:57 +0200 Subject: [PATCH] fix Quaternion --- .../cz/fidentis/analyst/icp/Quaternion.java | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/Comparison/src/main/java/cz/fidentis/analyst/icp/Quaternion.java b/Comparison/src/main/java/cz/fidentis/analyst/icp/Quaternion.java index ad522a29..1914fc5b 100644 --- a/Comparison/src/main/java/cz/fidentis/analyst/icp/Quaternion.java +++ b/Comparison/src/main/java/cz/fidentis/analyst/icp/Quaternion.java @@ -128,7 +128,6 @@ public final class Quaternion { * @return a rotation matrix (4x4) */ public Matrix4d toMatrix(){ -<<<<<<< HEAD double xx = x * x; double xy = x * y; double xz = x * z; @@ -143,22 +142,7 @@ public final class Quaternion { 2 * ( xy - zw ), 1 - 2 * ( xx + zz ), 2 * ( yz + xw ), 0, 2 * ( xz + yw ), 2 * ( yz - xw ), 1 - 2 * ( xx + yy ), 0, 0, 0,0, 1); -======= - double xx = x * x; - double xy = x * y; - double xz = x * z; - double xw = x * w; - double yy = y * y; - double yz = y * z; - double yw = y * w; - double zz = z * z; - double zw = z * w; - - return new Matrix4d(1 - 2 * ( yy + zz ),2 * ( xy + zw), 2 * ( xz - yw),0, - 2 * ( xy - zw ), 1 - 2 * ( xx + zz ), 2 * ( yz + xw ), 0, - 2 * ( xz + yw ), 2 * ( yz - xw ), 1 - 2 * ( xx + yy ), 0, - 0, 0,0, 1); ->>>>>>> 1d9816fc2b5d38ad345c195f2913fb8adf5a5de1 + } } -- GitLab