11 #ifndef CUBBYFLOW_MARCHING_SQUARES_TABLE_HPP 12 #define CUBBYFLOW_MARCHING_SQUARES_TABLE_HPP 18 static const float vertexOffset2D[4][2] = {
19 { 0.0f, 0.0f }, { 1.0f, 0.0f }, { 1.0f, 1.0f }, { 0.0f, 1.0f }
24 static const int edgeConnection2D[4][2] = {
25 { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 0 }
29 static const float edgeDirection2D[4][2] = {
30 { 1.0f, 0.0f }, { 0.0f, 1.0f }, { -1.0f, 0.0f }, { 0.0f, -1.0f }
42 static const int squareEdgeFlags[16] = { 0x000, 0x009, 0x003, 0x00a,
43 0x006, 0x00f, 0x005, 0x00c,
44 0x00c, 0x005, 0x00f, 0x006,
45 0x00a, 0x003, 0x009, 0x000 };
68 static const int triangleConnectionTable2D[16][13] = {
69 {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
70 { 0, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
71 { 4, 1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
72 { 0, 1, 7, 1, 5, 7, -1, -1, -1, -1, -1, -1, -1 },
73 { 5, 2, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
74 { 0, 4, 7, 2, 6, 5, -1, -1, -1, -1, -1, -1, -1 },
75 { 4, 1, 6, 1, 2, 6, -1, -1, -1, -1, -1, -1, -1 },
76 { 0, 1, 7, 7, 1, 6, 1, 2, 6, -1, -1, -1, -1 },
77 { 7, 6, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
78 { 0, 4, 6, 0, 6, 3, -1, -1, -1, -1, -1, -1, -1 },
79 { 3, 7, 6, 6, 7, 4, 6, 4, 5, 1, 5, 4, -1 },
80 { 0, 6, 3, 0, 5, 6, 0, 1, 5, -1, -1, -1, -1 },
81 { 7, 5, 3, 5, 2, 3, -1, -1, -1, -1, -1, -1, -1 },
82 { 3, 0, 4, 3, 4, 5, 3, 5, 2, -1, -1, -1, -1 },
83 { 2, 3, 7, 2, 7, 4, 2, 4, 1, -1, -1, -1, -1 },
84 { 0, 1, 3, 1, 2, 3, -1, -1, -1, -1, -1, -1, -1 },
Definition: pybind11Utils.hpp:20