NetDEM v1.0
Loading...
Searching...
No Matches
igl_wrapper.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "stl_model.hpp"
4#include "utils_math.hpp"
5#include <Eigen/Dense>
6#include <igl/signed_distance.h>
7
8namespace netdem {
9
11public:
12 static void RemoveUnreferencedVertices(VecXT<Vec3d> *const v,
13 VecXT<Vec3i> *const f);
14
15 static void RemoveDuplicateVertices(VecXT<Vec3d> *const v,
16 VecXT<Vec3i> *const f);
17
18 static void RemoveDuplicateVertices(VecXT<Vec3d> *const v);
19
20 static void MeshIntersect(const VecXT<Vec3d> &va, const VecXT<Vec3i> &fa,
21 const VecXT<Vec3d> &vb, const VecXT<Vec3i> &fb,
22 VecXT<Vec3d> *const vab, VecXT<Vec3i> *const fab,
23 VecXT<int> *const jab);
24
25 static void MeshIntersect(const VecXT<Vec3d> &va, const VecXT<Vec3i> &fa,
26 const VecXT<Vec3d> &vb, const VecXT<Vec3i> &fb,
27 VecXT<Vec3d> *const vab, VecXT<Vec3i> *const fab);
28
29 static void MeshIntersect(const VecXT<Vec3d> &va, const VecXT<Vec3i> &fa,
30 double dist_pc_to_plane, Vec3d const &dir_n,
31 VecXT<Vec3d> *const vab, VecXT<Vec3i> *const fab,
32 VecXT<int> *const jab);
33
34 static void MeshIntersect(const VecXT<Vec3d> &va, const VecXT<Vec3i> &fa,
35 double dist_pc_to_plane, Vec3d const &dir_n,
36 VecXT<Vec3d> *const vab, VecXT<Vec3i> *const fab);
37
38 static void MeshRefine(VecXT<Vec3d> *const v, VecXT<Vec3i> *const f,
39 int num_refines);
40
41 static void MeshDecimate(VecXT<Vec3d> *const v, VecXT<Vec3i> *const f,
42 int num_nodes);
43
44 static int FacetComponents(const VecXT<Vec3i> &fi, VecXT<int> *const fc);
45
46 static void ReorientFacets(const VecXT<Vec3d> &v, VecXT<Vec3i> *const f);
47
48 static bool CheckWinding(const VecXT<Vec3d> &v, const VecXT<Vec3i> &f);
49
50 static void ConvexHull(const VecXT<Vec3d> &v0, VecXT<Vec3d> *const v1,
51 VecXT<Vec3i> *const f1);
52
53 static void TetmeshBoundary(const VecXT<Vec4i> &tt, VecXT<Vec3i> *const ff,
54 VecXT<int> *const fj);
55
56 static void TetmeshBoundary(const VecXT<Vec4i> &tt, VecXT<Vec3i> *const ff);
57
58 static void MarchingCubes(VecXT<Vec3d> *const vv, VecXT<Vec3i> *const ff,
59 VecXT<VecXT<VecXT<double>>> const &sdf,
60 Vec3d const &corner, Vec3d const &spacing,
61 double iso_value = 0);
62
64 const VecXT<Vec3i> &f,
65 const VecXT<Vec3d> &v_querry);
66};
67
68} // namespace netdem
Definition igl_wrapper.hpp:10
static void MeshIntersect(const VecXT< Vec3d > &va, const VecXT< Vec3i > &fa, const VecXT< Vec3d > &vb, const VecXT< Vec3i > &fb, VecXT< Vec3d > *const vab, VecXT< Vec3i > *const fab, VecXT< int > *const jab)
Definition igl_wrapper.cpp:237
static void MeshDecimate(VecXT< Vec3d > *const v, VecXT< Vec3i > *const f, int num_nodes)
Definition igl_wrapper.cpp:311
static int FacetComponents(const VecXT< Vec3i > &fi, VecXT< int > *const fc)
Definition igl_wrapper.cpp:327
static void MeshRefine(VecXT< Vec3d > *const v, VecXT< Vec3i > *const f, int num_refines)
Definition igl_wrapper.cpp:296
static void ReorientFacets(const VecXT< Vec3d > &v, VecXT< Vec3i > *const f)
Definition igl_wrapper.cpp:340
static void ConvexHull(const VecXT< Vec3d > &v0, VecXT< Vec3d > *const v1, VecXT< Vec3i > *const f1)
Definition igl_wrapper.cpp:360
static void RemoveDuplicateVertices(VecXT< Vec3d > *const v, VecXT< Vec3i > *const f)
Definition igl_wrapper.cpp:209
static VecXT< int > GetPointsInsideMesh(const VecXT< Vec3d > &v, const VecXT< Vec3i > &f, const VecXT< Vec3d > &v_querry)
Definition igl_wrapper.cpp:428
static bool CheckWinding(const VecXT< Vec3d > &v, const VecXT< Vec3i > &f)
Definition igl_wrapper.cpp:350
static void TetmeshBoundary(const VecXT< Vec4i > &tt, VecXT< Vec3i > *const ff, VecXT< int > *const fj)
Definition igl_wrapper.cpp:373
static void MarchingCubes(VecXT< Vec3d > *const vv, VecXT< Vec3i > *const ff, VecXT< VecXT< VecXT< double > > > const &sdf, Vec3d const &corner, Vec3d const &spacing, double iso_value=0)
Definition igl_wrapper.cpp:394
static void RemoveUnreferencedVertices(VecXT< Vec3d > *const v, VecXT< Vec3i > *const f)
Definition igl_wrapper.cpp:193
Definition bond_entry.hpp:7
std::vector< T > VecXT
Definition utils_macros.hpp:31
std::array< double, 3 > Vec3d
Definition utils_macros.hpp:18
dir_n
Definition json_serilization.hpp:19