RSMesh 1.0.0
一个曲面重构的系统,输入为点云,输出为obj,stl等主流格式的网格文件,使用的方法为径向基函数插值,采取了并行优化、Intel-MKL等优化措施,支持百万级别的点云
载入中...
搜索中...
未找到
domain_divider.h
1//
2// Created by RainSure on 2024/2/18.
3//
4
5#ifndef RSMESH_DOMAIN_DIVIDER_H
6#define RSMESH_DOMAIN_DIVIDER_H
7
8#include "types.h"
9#include "geometry/point3d.h"
10#include "geometry/bbox3d.h"
11#include "domain.h"
12#include <vector>
13#include <list>
14#include <utility>
15
16namespace rsmesh::preconditioner {
18 static constexpr double overlap_quota = 0.75;
19 static constexpr index_t max_leaf_size = 256;
20
21 public:
22 domain_divider(const geometry::points3d& points, const geometry::points3d& grad_points,
23 const std::vector<index_t>& point_indices,
24 const std::vector<index_t>& grad_point_indices,
25 const std::vector<index_t>& poly_point_indices);
26
27 std::pair<std::vector<index_t>, std::vector<index_t>> choose_coarse_points(double ratio) const;
28
29 const std::list<domain>& domains() const;
30
31 std::list<domain>&& into_domains();
32
33 private:
34 void divide_domain(std::list<domain>::iterator it);
35
36 void divide_domains();
37
38 geometry::bbox3d domain_bbox(const domain& domain) const;
39
40 static double round_half_to_even(double d);
41
42 const geometry::points3d& points_;
43 const geometry::points3d& grad_points_;
44
45 index_t mixed_size_of_root_;
46 double longest_side_length_of_root_;
47 std::vector<index_t> poly_point_idcs_;
48 std::list<domain> domains_;
49 };
50} // namespace rsmesh::preconditioner
51
52#endif //RSMESH_DOMAIN_DIVIDER_H
vectors3d points3d
3维点的集合
Definition point3d.h:48
该命名空间下主要定义了关于krylov子空间方法的预处理相关的类和函数