Fix lookuptable

This commit is contained in:
Trygve 2024-05-07 18:48:33 +02:00
parent 62d62987d3
commit 9300fa729c

View File

@ -152,27 +152,33 @@ constexpr std::tuple<double, double, double, double> marching_squares_lookup(int
{
switch (mcase) {
case 1:
case 14:
return {0, 0.5, 0.5, 0};
case 14:
return {0.5, 0, 0, 0.5};
case 2:
return {0.5, 0, 1, 0.5};
case 13:
return {1, 0.5, 0.5, 0};
case 3:
case 12:
return {0, 0.5, 1, 0.5};
case 12:
return {1, 0.5, 0, 0.5};
case 4:
case 11:
return {0.5, 1, 1, 0.5};
case 11:
return {1, 0.5, 0.5, 1};
case 5:
case 10:
return {0, 0, 0, 0}; //FIXME
case 6:
case 9:
return {0.5, 1, 0.5, 0};
case 9:
return {0.5, 0, 0.5, 1};
case 7:
case 8:
return {0, 0.5, 0.5, 1};
case 13:
return {1, 0.5, 0.5, 0};
case 8:
return {0.5, 0.5, 0, 0.5};
};
}