From 95f6594bb92a599401502ad29e07d19f42518357 Mon Sep 17 00:00:00 2001 From: mckay Date: Mon, 1 Sep 2025 15:27:39 +0800 Subject: [PATCH] fix: update matrix references in hasher for cylinder and plane to use local_to_world. Hash of plane changed to col 0 and 3 --- .../interface/subface/simple/cylinder_face.hpp | 2 +- primitive_process/interface/subface/simple/plane.hpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/primitive_process/interface/subface/simple/cylinder_face.hpp b/primitive_process/interface/subface/simple/cylinder_face.hpp index e6f2312..db04f78 100644 --- a/primitive_process/interface/subface/simple/cylinder_face.hpp +++ b/primitive_process/interface/subface/simple/cylinder_face.hpp @@ -34,7 +34,7 @@ template <> struct hasher { size_t operator()(const internal::cylinder_paired_model_matrix &block) const { - Eigen::Matrix character_rows = block.data->world_to_local.matrix().topRows<2>(); + Eigen::Matrix character_rows = block.data->local_to_world.matrix().topRows<2>(); return XXH3_64bits(character_rows.data(), sizeof(decltype(character_rows))); } }; diff --git a/primitive_process/interface/subface/simple/plane.hpp b/primitive_process/interface/subface/simple/plane.hpp index 14acdb5..698d806 100644 --- a/primitive_process/interface/subface/simple/plane.hpp +++ b/primitive_process/interface/subface/simple/plane.hpp @@ -34,8 +34,11 @@ template <> struct hasher { size_t operator()(const internal::plane_paired_model_matrix &block) const { - Eigen::Vector4d character_row = block.data->world_to_local.matrix().row(0); - return XXH3_64bits(character_row.data(), sizeof(Eigen::Vector4d)); + const auto& mat = block.data->local_to_world.matrix(); + Eigen::Matrix character_col; + character_col.col(0) = mat.col(0); + character_col.col(1) = mat.col(3); + return XXH3_64bits(character_col.data(), sizeof(Eigen::Matrix)); } };