-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathHalfedgeMesh.h
62 lines (58 loc) · 2.15 KB
/
HalfedgeMesh.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#pragma once
// C++ libs
#include <memory>
// CUDA stuff
#include <cuda_runtime.h>
#include <device_launch_parameters.h>
// Project files
//#include "c_mc/helper_cuda.h"
#include "helper_cuda.h"
#include "CTimer.h"
#include "Quadrilaterals.h"
#include "Edges.h"
#include "EdgeHashTable.h"
#include "Halfedges.h"
#include "HalfedgeVertices.h"
#include "HalfedgeFaces.h"
#include "HalfedgeHashTable.h"
namespace p_mc {
/// <summary>
/// Construct a halfedge data structure from a
/// shared vertex mesh
/// </summary>
struct HalfedgeMesh {
using uint = unsigned int;
/// <summary>
/// Collect edges from a quadrilateral mesh and store them
/// into a hash table for further processing.
/// </summary>
/// <param name="q">quadrilaterals</param>
/// <param name="eht">hash table to store edges</param>
void edgeHashTable(Quadrilaterals& q, EdgeHashTable& eht);
/// <summary>
/// Compute unique edges from a shared vertex quadrilateral mesh
/// </summary>
/// <param name="q">quadrilateral mesh</param>
/// <param name="e">edges</param>
/// <returns></returns>
int edges(Quadrilaterals& q, Edges& e);
/// <summary>
/// Compute halfedge data structure from a shared vertex
/// quadrilateral mesh
/// </summary>
/// <param name="nr_v">nr. of vertices in the mesh</param>
/// <param name="q">quadrilaterals</param>
/// <param name="he">halfedges</param>
/// <param name="f">halfedge faces</param>
/// <param name="v">halfedge vertices</param>
/// <param name="timer">timer to measure performance</param>
/// <returns>number of halfedges in the mesh</returns>
int halfedges(const int nr_v, Quadrilaterals& q, Halfedges& he, HalfedgeFaces& f, HalfedgeVertices& v, CTimer& timer);
/// <summary>
/// Computes the number of non-manifold edges
/// </summary>
/// <param name="q">quadrilaterals in a shared vertex data structure</param>
/// <returns></returns>
int nonManifold(Quadrilaterals& q);
};
} // namespace p_mc