RSMesh 1.0.0
一个曲面重构的系统,输入为点云,输出为obj,stl等主流格式的网格文件,使用的方法为径向基函数插值,采取了并行优化、Intel-MKL等优化措施,支持百万级别的点云
载入中...
搜索中...
未找到
utils.h
1//
2// Created by RainSure on 2024/2/22.
3//
4
5#ifndef RSMESH_UTILS_H
6#define RSMESH_UTILS_H
7
8#include "rbf/biharmonic2d.h"
9#include "rbf/biharmonic3d.h"
10
11namespace rsmesh::common {
12
13 inline std::unique_ptr<rsmesh::rbf::rbf_base> make_rbf(const std::string& rbf_type,
14 const std::vector<double>& params) {
15 if(rbf_type == "biharmonic2d") {
16 return std::make_unique<rsmesh::rbf::biharmonic2d>(params);
17 }
18 if(rbf_type == "biharmonic3d") {
19 return std::make_unique<rsmesh::rbf::biharmonic3d>(params);
20 }
21
22 throw std::invalid_argument("Unknown RBF type: " + rbf_type);
23 }
24} // rsmesh::common
25
26
27#endif //RSMESH_UTILS_H
通用工具函数的命名空间,包括一个detail子命名空间