#pragma once #include "vde/core/point.h" #include "vde/core/transform.h" #include namespace vde::core { struct ICPResult { Transform3D transform; // Rigid transform aligning source to target double rms_error; // Root-mean-square error int iterations; // Number of iterations used bool converged; }; /// Iterative Closest Point (ICP) for rigid point cloud registration /// @param source Source point cloud (moved) /// @param target Target point cloud (fixed) /// @param max_iter Maximum iterations /// @param tolerance Convergence tolerance on RMS change [[nodiscard]] ICPResult icp_register(const std::vector& source, const std::vector& target, int max_iter = 50, double tolerance = 1e-6); } // namespace vde::core