Go to the documentation of this file.
57 #ifndef vtkm_worklet_contourtree_mesh3d_dem_triangulation_macros_h
58 #define vtkm_worklet_contourtree_mesh3d_dem_triangulation_macros_h
61 #define N_EDGE_TYPES 3
62 #define EDGE_TYPE_HORIZONTAL 0
63 #define EDGE_TYPE_VERTICAL 1
64 #define EDGE_TYPE_DIAGONAL 2
66 #define N_INCIDENT_EDGES_3D 14
67 #define MAX_OUTDEGREE_3D 6
70 #define VERTEX_ROW_3D(V, NROWS, NCOLS) (((V) % (NROWS * NCOLS)) / NCOLS)
73 #define VERTEX_COL_3D(V, NROWS, NCOLS) ((V) % (NCOLS))
76 #define VERTEX_SLICE_3D(V, NROWS, NCOLS) ((V) / (NROWS * NCOLS))
79 #define VERTEX_ID_3D(S, R, C, NROWS, NCOLS) (((S)*NROWS + (R)) * (NCOLS) + (C))
82 #define EDGE_ROW(E, NCOLS) ((E) / ((NCOLS) * (N_EDGE_TYPES)))
84 #define EDGE_COL(E, NCOLS) (((E) / (N_EDGE_TYPES)) % (NCOLS))
86 #define EDGE_WHICH(E) ((E) % (N_EDGE_TYPES))
88 #define EDGE_ID(R, C, W, NCOLS) ((((R) * (NCOLS) + (C)) * (N_EDGE_TYPES)) + (W))
90 #define EDGE_FROM(E, NCOLS) VERTEX_ID(EDGE_ROW(E, NCOLS), EDGE_COL(E, NCOLS), NCOLS)
92 #define EDGE_TO(E, NCOLS) \
93 VERTEX_ID(EDGE_ROW(E, NCOLS) + ((EDGE_WHICH(E) == EDGE_TYPE_HORIZONTAL) ? 0 : 1), \
94 EDGE_COL(E, NCOLS) + ((EDGE_WHICH(E) == EDGE_TYPE_VERTICAL) ? 0 : 1), \