diff --git a/meshers/transvoxel_tables.cpp b/meshers/transvoxel_tables.cpp index 46ae35e..4eaf9ae 100644 --- a/meshers/transvoxel_tables.cpp +++ b/meshers/transvoxel_tables.cpp @@ -78,7 +78,7 @@ const RegularCellData regularCellData[16] = { { 0xC4, { 0, 5, 4, 6, 8, 7, 9, 11, 10, 1, 3, 2 } }, //B { 0x64, { 0, 5, 4, 0, 4, 1, 1, 4, 3, 1, 3, 2 } }, { 0xC4, { 0, 4, 5, 6, 7, 8, 9, 10, 11, 1, 2, 3 } }, //C { 0x64, { 0, 4, 5, 0, 3, 4, 0, 1, 3, 1, 2, 3 } }, { 0xC4, { 0, 1, 2, 6, 7, 3, 8, 9, 4, 10, 11, 5 } }, //D { 0x64, { 0, 1, 2, 0, 2, 3, 0, 3, 4, 0, 4, 5 } }, - { 0x75, { 0, 1, 2, 0, 2, 3, 0, 3, 4, 0, 4, 5, 0, 5, 6 } }, + { 0xF5, { 0, 1, 2, 7, 8, 3, 9, 10, 4, 11, 12, 5, 13, 14, 6 } }, //E { 0x75, { 0, 1, 2, 0, 2, 3, 0, 3, 4, 0, 4, 5, 0, 5, 6 } }, { 0x95, { 0, 4, 5, 0, 3, 4, 0, 1, 3, 1, 2, 3, 6, 7, 8 } } }; @@ -88,7 +88,7 @@ const RegularCellData regularCellData[16] = { // The low byte contains the indexes for the two endpoints of the edge on which the vertex lies, // as numbered in Figure 3.7. The high byte contains the vertex reuse data shown in Figure 3.8. -const unsigned short regularVertexData[256][12] = { +const unsigned short regularVertexData[256][15] = { {}, { 0x6201, 0x5102, 0x3304 }, { 0x6201, 0x2315, 0x4113 }, @@ -153,8 +153,8 @@ const unsigned short regularVertexData[256][12] = { { 0x3304, 0x1146, 0x8157, 0x8337, 0x4223, 0x6201, 0x3304, 0x1146, 0x4223, 0x1146, 0x8337, 0x4223 }, { 0x4223, 0x5102, 0x1146, 0x8157, 0x8337, 0x5102, 0x8157, 0x5102, 0x8337 }, { 0x2315, 0x3304, 0x1146, 0x8157, 0x5102, 0x4113, 0x8337, 0x1326 }, - { 0x6201, 0x4113, 0x8337, 0x1326, 0x1146, 0x8157, 0x2315 }, - { 0x6201, 0x3304, 0x1146, 0x8157, 0x8337, 0x1326, 0x5102 }, + { 0x6201, 0x4113, 0x8337, 0x1326, 0x1146, 0x8157, 0x2315, 0x6201, 0x8337, 0x6201, 0x1326, 0x6201, 0x1146, 0x6201, 0x8157 }, + { 0x6201, 0x3304, 0x1146, 0x8157, 0x8337, 0x1326, 0x5102, 0x6201, 0x1146, 0x6201, 0x8157, 0x6201, 0x8337, 0x6201, 0x1326 }, { 0x1326, 0x1146, 0x8157, 0x8337, 0x1326, 0x8157 }, //64 5 12 15 { 0x1326, 0x8267, 0x1146 }, @@ -185,10 +185,10 @@ const unsigned short regularVertexData[256][12] = { { 0x3304, 0x1326, 0x8267, 0x2245, 0x4223, 0x4113, 0x8337 }, { 0x1326, 0x8267, 0x2245, 0x6201, 0x5102, 0x4223, 0x4113, 0x8337 }, { 0x3304, 0x1326, 0x8267, 0x2245, 0x4223, 0x6201, 0x2315, 0x8337 }, - { 0x5102, 0x1326, 0x8267, 0x2245, 0x2315, 0x8337, 0x4223 }, + { 0x5102, 0x1326, 0x8267, 0x2245, 0x2315, 0x8337, 0x4223, 0x5102, 0x8267, 0x5102, 0x2245, 0x5102, 0x2315, 0x5102, 0x8337 }, { 0x3304, 0x2245, 0x8267, 0x8337, 0x4113, 0x5102, 0x3304, 0x2245, 0x4113, 0x2245, 0x8337, 0x4113 }, { 0x8337, 0x8267, 0x2245, 0x6201, 0x4113, 0x8267, 0x6201, 0x8267, 0x4113 }, - { 0x5102, 0x6201, 0x2315, 0x8337, 0x8267, 0x2245, 0x3304 }, + { 0x5102, 0x6201, 0x2315, 0x8337, 0x8267, 0x2245, 0x3304, 0x5102, 0x2315, 0x5102, 0x8337, 0x5102, 0x8267, 0x5102, 0x2245 }, { 0x2315, 0x8337, 0x8267, 0x2245, 0x2315, 0x8267 }, //96 - { 0x2315, 0x2245, 0x8157, 0x1326, 0x8267, 0x1146 }, @@ -198,14 +198,14 @@ const unsigned short regularVertexData[256][12] = { { 0x4223, 0x8267, 0x1146, 0x5102, 0x2315, 0x2245, 0x8157 }, { 0x3304, 0x6201, 0x4223, 0x8267, 0x1146, 0x2315, 0x2245, 0x8157 }, { 0x4223, 0x8267, 0x1146, 0x5102, 0x6201, 0x2245, 0x8157, 0x4113 }, - { 0x3304, 0x2245, 0x8157, 0x4113, 0x4223, 0x8267, 0x1146 }, + { 0x3304, 0x2245, 0x8157, 0x4113, 0x4223, 0x8267, 0x1146, 0x3304, 0x8157, 0x3304, 0x4113, 0x3304, 0x4223, 0x3304, 0x8267 }, { 0x4223, 0x4113, 0x8337, 0x2315, 0x2245, 0x8157, 0x1326, 0x8267, 0x1146 }, { 0x6201, 0x5102, 0x3304, 0x4223, 0x4113, 0x8337, 0x2315, 0x2245, 0x8157, 0x1326, 0x8267, 0x1146 }, { 0x8337, 0x4223, 0x6201, 0x2245, 0x8157, 0x1326, 0x8267, 0x1146 }, { 0x4223, 0x5102, 0x3304, 0x2245, 0x8157, 0x8337, 0x1326, 0x8267, 0x1146 }, { 0x8267, 0x1146, 0x5102, 0x4113, 0x8337, 0x2315, 0x2245, 0x8157 }, { 0x6201, 0x4113, 0x8337, 0x8267, 0x1146, 0x3304, 0x2315, 0x2245, 0x8157 }, - { 0x8337, 0x8267, 0x1146, 0x5102, 0x6201, 0x2245, 0x8157 }, + { 0x8337, 0x8267, 0x1146, 0x5102, 0x6201, 0x2245, 0x8157, 0x8337, 0x1146, 0x8337, 0x5102, 0x8337, 0x6201, 0x8337, 0x2245 }, { 0x3304, 0x2245, 0x8157, 0x8337, 0x8267, 0x1146, 0x3304, 0x8157, 0x3304, 0x8337, 0x3304, 0x8267 }, //112 0 3 5 { 0x8157, 0x2315, 0x3304, 0x1326, 0x8267, 0x2315, 0x1326, 0x2315, 0x8267 }, @@ -214,13 +214,13 @@ const unsigned short regularVertexData[256][12] = { { 0x8267, 0x8157, 0x4113, 0x5102, 0x1326, 0x8157, 0x5102, 0x8157, 0x1326 }, { 0x5102, 0x4223, 0x8267, 0x8157, 0x2315, 0x3304, 0x5102, 0x4223, 0x2315, 0x4223, 0x8157, 0x2315 }, { 0x2315, 0x6201, 0x4223, 0x8267, 0x8157, 0x6201, 0x8267, 0x6201, 0x8157 }, - { 0x3304, 0x5102, 0x4223, 0x8267, 0x8157, 0x4113, 0x6201 }, + { 0x3304, 0x5102, 0x4223, 0x8267, 0x8157, 0x4113, 0x6201, 0x3304, 0x4223, 0x3304, 0x8267, 0x3304, 0x8157, 0x3304, 0x4113 }, { 0x4113, 0x4223, 0x8267, 0x8157, 0x4113, 0x8267 }, { 0x8157, 0x2315, 0x3304, 0x1326, 0x8267, 0x4223, 0x4113, 0x8337 }, { 0x8157, 0x2315, 0x6201, 0x5102, 0x1326, 0x8267, 0x4223, 0x4113, 0x8337 }, - { 0x8157, 0x8337, 0x4223, 0x6201, 0x3304, 0x1326, 0x8267 }, + { 0x8157, 0x8337, 0x4223, 0x6201, 0x3304, 0x1326, 0x8267, 0x8157, 0x4223, 0x8157, 0x6201, 0x8157, 0x3304, 0x8157, 0x1326 }, { 0x5102, 0x1326, 0x8267, 0x8157, 0x8337, 0x4223, 0x5102, 0x8267, 0x5102, 0x8157, 0x5102, 0x8337 }, - { 0x8267, 0x8157, 0x2315, 0x3304, 0x5102, 0x4113, 0x8337 }, + { 0x8267, 0x8157, 0x2315, 0x3304, 0x5102, 0x4113, 0x8337, 0x8267, 0x2315, 0x8267, 0x3304, 0x8267, 0x5102, 0x8267, 0x4113 }, { 0x6201, 0x4113, 0x8337, 0x8267, 0x8157, 0x2315, 0x6201, 0x8337, 0x6201, 0x8267, 0x6201, 0x8157 }, { 0x6201, 0x3304, 0x5102, 0x8337, 0x8267, 0x8157 }, { 0x8337, 0x8267, 0x8157 }, @@ -253,9 +253,9 @@ const unsigned short regularVertexData[256][12] = { { 0x4223, 0x4113, 0x8157, 0x8267, 0x3304, 0x1146, 0x2245 }, { 0x6201, 0x5102, 0x1146, 0x2245, 0x4223, 0x4113, 0x8157, 0x8267 }, { 0x8157, 0x8267, 0x4223, 0x6201, 0x2315, 0x3304, 0x1146, 0x2245 }, - { 0x2315, 0x8157, 0x8267, 0x4223, 0x5102, 0x1146, 0x2245 }, + { 0x2315, 0x8157, 0x8267, 0x4223, 0x5102, 0x1146, 0x2245, 0x2315, 0x8267, 0x2315, 0x4223, 0x2315, 0x5102, 0x2315, 0x1146 }, { 0x1326, 0x5102, 0x4113, 0x8157, 0x8267, 0x3304, 0x1146, 0x2245 }, - { 0x1326, 0x1146, 0x2245, 0x6201, 0x4113, 0x8157, 0x8267 }, + { 0x1326, 0x1146, 0x2245, 0x6201, 0x4113, 0x8157, 0x8267, 0x1326, 0x2245, 0x1326, 0x6201, 0x1326, 0x4113, 0x1326, 0x8157 }, { 0x5102, 0x6201, 0x2315, 0x8157, 0x8267, 0x1326, 0x3304, 0x1146, 0x2245 }, { 0x1326, 0x1146, 0x2245, 0x2315, 0x8157, 0x8267, 0x1326, 0x2245, 0x1326, 0x2315, 0x1326, 0x8157 }, //160 2 8 11 14 @@ -266,13 +266,13 @@ const unsigned short regularVertexData[256][12] = { { 0x2315, 0x2245, 0x8267, 0x8337, 0x5102, 0x4223, 0x1326 }, { 0x6201, 0x4223, 0x1326, 0x3304, 0x8337, 0x2315, 0x2245, 0x8267 }, { 0x4113, 0x6201, 0x2245, 0x8267, 0x8337, 0x5102, 0x4223, 0x1326 }, - { 0x4113, 0x4223, 0x1326, 0x3304, 0x2245, 0x8267, 0x8337 }, + { 0x4113, 0x4223, 0x1326, 0x3304, 0x2245, 0x8267, 0x8337, 0x4113, 0x1326, 0x4113, 0x3304, 0x4113, 0x2245, 0x4113, 0x8267 }, { 0x2315, 0x2245, 0x8267, 0x4223, 0x4113, 0x2245, 0x4223, 0x2245, 0x4113 }, { 0x2315, 0x2245, 0x8267, 0x4223, 0x4113, 0x6201, 0x5102, 0x3304 }, { 0x6201, 0x2245, 0x8267, 0x4223, 0x6201, 0x8267 }, { 0x3304, 0x2245, 0x8267, 0x4223, 0x5102, 0x2245, 0x4223, 0x2245, 0x5102 }, { 0x5102, 0x4113, 0x2315, 0x2245, 0x8267, 0x1326, 0x5102, 0x4113, 0x8267, 0x4113, 0x2245, 0x8267 }, - { 0x4113, 0x2315, 0x2245, 0x8267, 0x1326, 0x3304, 0x6201 }, + { 0x4113, 0x2315, 0x2245, 0x8267, 0x1326, 0x3304, 0x6201, 0x4113, 0x2245, 0x4113, 0x8267, 0x4113, 0x1326, 0x4113, 0x3304 }, { 0x5102, 0x6201, 0x2245, 0x8267, 0x1326, 0x6201, 0x8267, 0x6201, 0x1326 }, { 0x3304, 0x2245, 0x8267, 0x1326, 0x3304, 0x8267 }, //176 0 3 10 @@ -281,14 +281,14 @@ const unsigned short regularVertexData[256][12] = { { 0x3304, 0x1146, 0x8267, 0x8337, 0x4113, 0x6201, 0x3304, 0x8337, 0x4113, 0x3304, 0x1146, 0x8337 }, { 0x8337, 0x4113, 0x5102, 0x1146, 0x8267, 0x4113, 0x1146, 0x4113, 0x8267 }, { 0x8267, 0x8337, 0x2315, 0x3304, 0x1146, 0x5102, 0x4223, 0x1326 }, - { 0x1146, 0x8267, 0x8337, 0x2315, 0x6201, 0x4223, 0x1326 }, + { 0x1146, 0x8267, 0x8337, 0x2315, 0x6201, 0x4223, 0x1326, 0x1146, 0x8337, 0x1146, 0x2315, 0x1146, 0x6201, 0x1146, 0x4223 }, { 0x8267, 0x8337, 0x4113, 0x6201, 0x3304, 0x1146, 0x5102, 0x4223, 0x1326 }, { 0x4113, 0x4223, 0x1326, 0x1146, 0x8267, 0x8337, 0x4113, 0x1326, 0x4113, 0x1146, 0x4113, 0x8267 }, { 0x3304, 0x2315, 0x4113, 0x4223, 0x8267, 0x1146, 0x3304, 0x2315, 0x8267, 0x2315, 0x4223, 0x8267 }, - { 0x2315, 0x6201, 0x5102, 0x1146, 0x8267, 0x4223, 0x4113 }, + { 0x2315, 0x6201, 0x5102, 0x1146, 0x8267, 0x4223, 0x4113, 0x2315, 0x5102, 0x2315, 0x1146, 0x2315, 0x8267, 0x2315, 0x4223 }, { 0x1146, 0x8267, 0x4223, 0x6201, 0x3304, 0x8267, 0x6201, 0x8267, 0x3304 }, { 0x5102, 0x1146, 0x8267, 0x4223, 0x5102, 0x8267 }, - { 0x8267, 0x1326, 0x5102, 0x4113, 0x2315, 0x3304, 0x1146 }, + { 0x8267, 0x1326, 0x5102, 0x4113, 0x2315, 0x3304, 0x1146, 0x8267, 0x5102, 0x8267, 0x4113, 0x8267, 0x2315, 0x8267, 0x3304 }, { 0x6201, 0x4113, 0x2315, 0x1326, 0x1146, 0x8267 }, { 0x6201, 0x3304, 0x1146, 0x8267, 0x1326, 0x5102, 0x6201, 0x1146, 0x6201, 0x8267, 0x6201, 0x1326 }, { 0x1326, 0x1146, 0x8267 }, @@ -300,11 +300,11 @@ const unsigned short regularVertexData[256][12] = { { 0x8337, 0x8157, 0x1146, 0x5102, 0x4223, 0x8157, 0x5102, 0x8157, 0x4223 }, { 0x6201, 0x4223, 0x8337, 0x8157, 0x1146, 0x3304, 0x6201, 0x4223, 0x1146, 0x4223, 0x8157, 0x1146 }, { 0x8337, 0x8157, 0x1146, 0x5102, 0x4223, 0x6201, 0x2315, 0x4113 }, - { 0x4223, 0x8337, 0x8157, 0x1146, 0x3304, 0x2315, 0x4113 }, + { 0x4223, 0x8337, 0x8157, 0x1146, 0x3304, 0x2315, 0x4113, 0x4223, 0x8157, 0x4223, 0x1146, 0x4223, 0x3304, 0x4223, 0x2315 }, { 0x4223, 0x4113, 0x8157, 0x1146, 0x1326, 0x4113, 0x1146, 0x4113, 0x1326 }, { 0x4223, 0x4113, 0x8157, 0x1146, 0x1326, 0x6201, 0x5102, 0x3304 }, { 0x1146, 0x8157, 0x2315, 0x6201, 0x4223, 0x1326, 0x1146, 0x8157, 0x4223, 0x8157, 0x6201, 0x4223 }, - { 0x4223, 0x5102, 0x3304, 0x2315, 0x8157, 0x1146, 0x1326 }, + { 0x4223, 0x5102, 0x3304, 0x2315, 0x8157, 0x1146, 0x1326, 0x4223, 0x3304, 0x4223, 0x2315, 0x4223, 0x8157, 0x4223, 0x1146 }, { 0x4113, 0x8157, 0x1146, 0x5102, 0x4113, 0x1146 }, { 0x6201, 0x4113, 0x8157, 0x1146, 0x3304, 0x4113, 0x1146, 0x4113, 0x3304 }, { 0x2315, 0x8157, 0x1146, 0x5102, 0x6201, 0x8157, 0x5102, 0x8157, 0x6201 }, @@ -313,14 +313,14 @@ const unsigned short regularVertexData[256][12] = { { 0x2245, 0x3304, 0x1326, 0x8337, 0x8157, 0x3304, 0x8337, 0x3304, 0x8157 }, { 0x6201, 0x2245, 0x8157, 0x8337, 0x1326, 0x5102, 0x6201, 0x2245, 0x1326, 0x2245, 0x8337, 0x1326 }, { 0x2245, 0x3304, 0x1326, 0x8337, 0x8157, 0x6201, 0x2315, 0x4113 }, - { 0x2245, 0x2315, 0x4113, 0x5102, 0x1326, 0x8337, 0x8157 }, + { 0x2245, 0x2315, 0x4113, 0x5102, 0x1326, 0x8337, 0x8157, 0x2245, 0x4113, 0x2245, 0x5102, 0x2245, 0x1326, 0x2245, 0x8337 }, { 0x4223, 0x8337, 0x8157, 0x2245, 0x3304, 0x5102, 0x4223, 0x2245, 0x3304, 0x4223, 0x8337, 0x2245 }, { 0x8157, 0x2245, 0x6201, 0x4223, 0x8337, 0x2245, 0x4223, 0x2245, 0x8337 }, { 0x2245, 0x3304, 0x5102, 0x4223, 0x8337, 0x8157, 0x4113, 0x6201, 0x2315 }, { 0x4223, 0x8337, 0x8157, 0x2245, 0x2315, 0x4113, 0x4223, 0x8157, 0x4223, 0x2245, 0x4223, 0x2315 }, { 0x4113, 0x8157, 0x2245, 0x3304, 0x1326, 0x4223, 0x4113, 0x8157, 0x1326, 0x8157, 0x3304, 0x1326 }, - { 0x1326, 0x4223, 0x4113, 0x8157, 0x2245, 0x6201, 0x5102 }, - { 0x8157, 0x2245, 0x3304, 0x1326, 0x4223, 0x6201, 0x2315 }, + { 0x1326, 0x4223, 0x4113, 0x8157, 0x2245, 0x6201, 0x5102, 0x1326, 0x4113, 0x1326, 0x8157, 0x1326, 0x2245, 0x1326, 0x6201 }, + { 0x8157, 0x2245, 0x3304, 0x1326, 0x4223, 0x6201, 0x2315, 0x8157, 0x3304, 0x8157, 0x1326, 0x8157, 0x4223, 0x8157, 0x6201 }, { 0x5102, 0x1326, 0x4223, 0x2315, 0x8157, 0x2245 }, { 0x3304, 0x5102, 0x4113, 0x8157, 0x2245, 0x5102, 0x8157, 0x5102, 0x2245 }, { 0x4113, 0x8157, 0x2245, 0x6201, 0x4113, 0x2245 }, @@ -330,10 +330,10 @@ const unsigned short regularVertexData[256][12] = { { 0x1146, 0x1326, 0x8337, 0x2315, 0x2245, 0x1326, 0x2315, 0x1326, 0x2245 }, { 0x1146, 0x1326, 0x8337, 0x2315, 0x2245, 0x6201, 0x5102, 0x3304 }, { 0x6201, 0x2245, 0x1146, 0x1326, 0x8337, 0x4113, 0x6201, 0x2245, 0x8337, 0x2245, 0x1326, 0x8337 }, - { 0x2245, 0x1146, 0x1326, 0x8337, 0x4113, 0x5102, 0x3304 }, + { 0x2245, 0x1146, 0x1326, 0x8337, 0x4113, 0x5102, 0x3304, 0x2245, 0x1326, 0x2245, 0x8337, 0x2245, 0x4113, 0x2245, 0x5102 }, { 0x5102, 0x1146, 0x2245, 0x2315, 0x8337, 0x4223, 0x5102, 0x1146, 0x8337, 0x1146, 0x2315, 0x8337 }, - { 0x1146, 0x3304, 0x6201, 0x4223, 0x8337, 0x2315, 0x2245 }, - { 0x8337, 0x4113, 0x6201, 0x2245, 0x1146, 0x5102, 0x4223 }, + { 0x1146, 0x3304, 0x6201, 0x4223, 0x8337, 0x2315, 0x2245, 0x1146, 0x6201, 0x1146, 0x4223, 0x1146, 0x8337, 0x1146, 0x2315 }, + { 0x8337, 0x4113, 0x6201, 0x2245, 0x1146, 0x5102, 0x4223, 0x8337, 0x6201, 0x8337, 0x2245, 0x8337, 0x1146, 0x8337, 0x5102 }, { 0x4223, 0x8337, 0x4113, 0x3304, 0x2245, 0x1146 }, { 0x4113, 0x2315, 0x2245, 0x1146, 0x1326, 0x4223, 0x4113, 0x1146, 0x1326, 0x4113, 0x2315, 0x1146 }, { 0x1146, 0x1326, 0x4223, 0x4113, 0x2315, 0x2245, 0x6201, 0x5102, 0x3304 }, diff --git a/meshers/transvoxel_tables.h b/meshers/transvoxel_tables.h index b58fc61..99e4b64 100644 --- a/meshers/transvoxel_tables.h +++ b/meshers/transvoxel_tables.h @@ -73,7 +73,7 @@ struct TransitionCellData { extern const unsigned char regularCellClass[256]; extern const RegularCellData regularCellData[16]; -extern const unsigned short regularVertexData[256][12]; +extern const unsigned short regularVertexData[256][15]; extern const unsigned char transitionCellClass[512]; extern const TransitionCellData transitionCellData[56]; extern const unsigned char transitionCornerData[13];