RSMesh 1.0.0
一个曲面重构的系统,输入为点云,输出为obj,stl等主流格式的网格文件,使用的方法为径向基函数插值,采取了并行优化、Intel-MKL等优化措施,支持百万级别的点云
载入中...
搜索中...
未找到
rmt_node_list.h
1//
2// Created by RainSure on 2024/2/23.
3//
4
5#ifndef RSMESH_RMT_NODE_LIST_H
6#define RSMESH_RMT_NODE_LIST_H
7
8#include <array>
9#include <unordered_map>
10#include "isosurface/rmt_node.h"
11#include "isosurface/isosurface_types.h"
12namespace rsmesh::isosurface {
13 namespace detail {
14 class neighbor_cell_vectors : public std::array<cell_vector, 14> {
15 using base = std::array<cell_vector, 14>;
16
17 public:
19 };
20 } // namespace detail
21
22 // Coefficients for the three primitive vectors
23// to reproduce each NeighborVectors.
24 extern const detail::neighbor_cell_vectors NeighborCellVectors;
25
26 class rmt_node_list : std::unordered_map<cell_vector, rmt_node> {
27 using base = std::unordered_map<cell_vector, rmt_node>;
28
29 public:
30 using base::at;
31 using base::begin;
32 using base::clear;
33 using base::contains;
34 using base::emplace;
35 using base::end;
36 using base::erase;
37 using base::find;
38 using base::size;
39
40 rmt_node* node_ptr(const cell_vector& cv) {
41 auto it = find(cv);
42 return it != end() ? &it->second : nullptr;
43 }
44
45 rmt_node* neighbor_node_ptr(const cell_vector& cv, edge_index ei) {
46 return node_ptr(cv + NeighborCellVectors.at(ei));
47 }
48 };
49}
50
51#endif //RSMESH_RMT_NODE_LIST_H
该命名空间下主要定义了等值面提取相关的类和函数