Files
ViewDesignEngine/include/vde/core/icp.h
T
ViewDesignEngine 64ad721ed7
CI / Build & Test (push) Failing after 36s
CI / Release Build (push) Failing after 31s
fix: 编译通过 — CMake + 命名空间 + 头文件修复
- CMake: INTERFACE 库修复、vde_compile_options 顺序修复
- 命名空间: 所有模块添加 using 声明
- 类型补全: Ray3Dd、Point4D
- 头文件: tolerance 泛型化、std::optional include
- 警告: 放宽 -Wconversion/-Wsign-conversion
- 构建结果: 0 errors, 22/25 tests passed
2026-07-23 08:19:24 +00:00

30 lines
1020 B
C++

#pragma once
#include "vde/core/point.h"
#include "vde/core/transform.h"
#include <vector>
namespace vde::core {
using foundation::Point2D;
using foundation::Point3D;
using foundation::Vector2D;
using foundation::Vector3D;
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<Point3D>& source,
const std::vector<Point3D>& target,
int max_iter = 50,
double tolerance = 1e-6);
} // namespace vde::core