RSMesh 1.0.0
一个曲面重构的系统,输入为点云,输出为obj,stl等主流格式的网格文件,使用的方法为径向基函数插值,采取了并行优化、Intel-MKL等优化措施,支持百万级别的点云
载入中...
搜索中...
未找到
isosurface_types.h
1//
2// Created by RainSure on 2024/2/23.
3//
4
5#ifndef RSMESH_ISOSURFACE_TYPES_H
6#define RSMESH_ISOSURFACE_TYPES_H
7
8#include "Eigen/Core"
9#include "boost/container_hash/hash.hpp"
10#include <array>
11#include <cstdint>
12#include <functional>
13#include "types.h"
14
15namespace rsmesh::isosurface {
16 using cell_vector = Eigen::Vector3i;
17
18 using cell_vectors = Eigen::Matrix<int, Eigen::Dynamic, 3, Eigen::RowMajor>;
19
20 using vertex_index = index_t;
21
22 using face = std::array<vertex_index, 3>;
23}
24
25template <>
26struct std::hash<rsmesh::isosurface::cell_vector> {
27 std::size_t operator()(const rsmesh::isosurface::cell_vector& cv) const noexcept {
28 std::size_t seed{};
29 boost::hash_combine(seed, std::hash<int>()(cv(0)));
30 boost::hash_combine(seed, std::hash<int>()(cv(1)));
31 boost::hash_combine(seed, std::hash<int>()(cv(2)));
32 return seed;
33 }
34};
35
36
37#endif //RSMESH_ISOSURFACE_TYPES_H
该命名空间下主要定义了等值面提取相关的类和函数
本系统的主命名空间,包含了common, examples, fmm, geometry, numeric, point_cloud等子命名空间