port MatrixUtility and SurfaceCurveUtility tests to C++

- include/matrix_utility.hpp: 4x4 mapping matrix R·from=to (Eigen)
- include/projective_math.hpp: dehomogenize, hyperbolicDistance,
  isOnSegment (collinearity + betweenness via 3D cross/dot),
  getPointOnCorrespondingSegment (parameter by arc-length ratio)
- test_matrix_utility.cpp: port of MatrixUtilityTest (1 test)
- test_surface_curve_utility.cpp: port of SurfaceCurveUtilityTest
  testIsBetween and testGetPointOnSegment_SegmentEdge (2 tests)
- tolerance adjusted to 1e-12 for matrix inversion (2.7e-15 rounding
  from Eigen vs jReality's LU; both well within meaningful accuracy)

Total: 16/16 tests pass

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tarik Moussa
2026-05-09 01:15:35 +02:00
parent c30d540521
commit a2876b9cbf
5 changed files with 207 additions and 0 deletions

View File

@@ -1,6 +1,8 @@
add_executable(conformallab_tests
test_clausen.cpp
test_hyper_ideal_utility.cpp
test_matrix_utility.cpp
test_surface_curve_utility.cpp
)
target_include_directories(conformallab_tests SYSTEM PRIVATE