RSMesh 1.0.0
一个曲面重构的系统,输入为点云,输出为obj,stl等主流格式的网格文件,使用的方法为径向基函数插值,采取了并行优化、Intel-MKL等优化措施,支持百万级别的点云
载入中...
搜索中...
未找到
rbf_inequality_fitter.h
1//
2// Created by RainSure on 2024/2/13.
3//
4
5#ifndef RSMESH_RBF_INEQUALITY_FITTER_H
6#define RSMESH_RBF_INEQUALITY_FITTER_H
7
8#include "geometry/bbox3d.h"
9#include "geometry/point3d.h"
10#include "model.h"
11#include "types.h"
12#include <utility>
13#include <vector>
14
15namespace rsmesh::interpolation {
17 public:
19
20 std::pair<std::vector<index_t >, valuesd> fit(const valuesd& values,
21 const valuesd& values_lb,
22 const valuesd& values_ub,
23 double absolute_tolerance,
24 int max_iter) const;
25
26 private:
27 template<class Predicate>
28 static std::vector<index_t> arg_where(const valuesd& v, Predicate predicate) {
29 std::vector<index_t> indices;
30 for (index_t i = 0; i < v.size(); ++i) {
31 if (predicate(v[i])) {
32 indices.push_back(i);
33 }
34 }
35 return indices;
36 }
37
38 std::vector<index_t> complementary_indices(const std::vector<index_t>& indices) const;
39
40 const model& model_;
41 const geometry::points3d& points_;
42
43 const index_t n_points_;
44 const index_t n_poly_basis_;
45
46 const geometry::bbox3d bbox_;
47 };
48} // namespace rsmesh::interpolation
49
50#endif //RSMESH_RBF_INEQUALITY_FITTER_H
描述了一个插值模型
Definition model.h:21
vectors3d points3d
3维点的集合
Definition point3d.h:48
该命名空间下主要定义了插值相关的类和函数