Skip to content

Commit

Permalink
Simplify enum
Browse files Browse the repository at this point in the history
  • Loading branch information
piellardj committed Mar 6, 2024
1 parent 66a557e commit d703487
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions src/lib/terrain/i-voxel-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,32 @@ interface IVoxelMaterial {
}

enum ENeighbour {
xMyMzM = 0, // whether or not there is a neighbour voxel at coords { X - 1, Y - 1, Z - 1 }
xMyMz0 = 1, // whether or not there is a neighbour voxel at coords { X - 1, Y - 1, Z }
xMyMzP = 2, // whether or not there is a neighbour voxel at coords { X - 1, Y - 1, Z + 1 }
xMy0zM = 3, // whether or not there is a neighbour voxel at coords { X - 1, Y , Z - 1 }
xMy0z0 = 4, // whether or not there is a neighbour voxel at coords { X - 1, Y , Z }
xMy0zP = 5, // whether or not there is a neighbour voxel at coords { X - 1, Y , Z + 1 }
xMyPzM = 6, // whether or not there is a neighbour voxel at coords { X - 1, Y + 1, Z - 1 }
xMyPz0 = 7, // whether or not there is a neighbour voxel at coords { X - 1, Y + 1, Z }
xMyPzP = 8, // whether or not there is a neighbour voxel at coords { X - 1, Y + 1, Z + 1 }
x0yMzM = 9, // whether or not there is a neighbour voxel at coords { X , Y - 1, Z - 1 }
x0yMz0 = 10, // whether or not there is a neighbour voxel at coords { X , Y - 1, Z }
x0yMzP = 11, // whether or not there is a neighbour voxel at coords { X , Y - 1, Z + 1 }
x0y0zM = 12, // whether or not there is a neighbour voxel at coords { X , Y , Z - 1 }
x0y0zP = 13, // whether or not there is a neighbour voxel at coords { X , Y , Z + 1 }
x0yPzM = 14, // whether or not there is a neighbour voxel at coords { X , Y + 1, Z - 1 }
x0yPz0 = 15, // whether or not there is a neighbour voxel at coords { X , Y + 1, Z }
x0yPzP = 16, // whether or not there is a neighbour voxel at coords { X , Y + 1, Z + 1 }
xPyMzM = 17, // whether or not there is a neighbour voxel at coords { X + 1, Y - 1, Z - 1 }
xPyMz0 = 18, // whether or not there is a neighbour voxel at coords { X + 1, Y - 1, Z }
xPyMzP = 19, // whether or not there is a neighbour voxel at coords { X + 1, Y - 1, Z + 1 }
xPy0zM = 20, // whether or not there is a neighbour voxel at coords { X + 1, Y , Z - 1 }
xPy0z0 = 21, // whether or not there is a neighbour voxel at coords { X + 1, Y , Z }
xPy0zP = 22, // whether or not there is a neighbour voxel at coords { X + 1, Y , Z + 1 }
xPyPzM = 23, // whether or not there is a neighbour voxel at coords { X + 1, Y + 1, Z - 1 }
xPyPz0 = 24, // whether or not there is a neighbour voxel at coords { X + 1, Y + 1, Z }
xPyPzP = 25, // whether or not there is a neighbour voxel at coords { X + 1, Y + 1, Z + 1 }
xMyMzM, // whether or not there is a neighbour voxel at coords { X - 1, Y - 1, Z - 1 }
xMyMz0, // whether or not there is a neighbour voxel at coords { X - 1, Y - 1, Z }
xMyMzP, // whether or not there is a neighbour voxel at coords { X - 1, Y - 1, Z + 1 }
xMy0zM, // whether or not there is a neighbour voxel at coords { X - 1, Y , Z - 1 }
xMy0z0, // whether or not there is a neighbour voxel at coords { X - 1, Y , Z }
xMy0zP, // whether or not there is a neighbour voxel at coords { X - 1, Y , Z + 1 }
xMyPzM, // whether or not there is a neighbour voxel at coords { X - 1, Y + 1, Z - 1 }
xMyPz0, // whether or not there is a neighbour voxel at coords { X - 1, Y + 1, Z }
xMyPzP, // whether or not there is a neighbour voxel at coords { X - 1, Y + 1, Z + 1 }
x0yMzM, // whether or not there is a neighbour voxel at coords { X , Y - 1, Z - 1 }
x0yMz0, // whether or not there is a neighbour voxel at coords { X , Y - 1, Z }
x0yMzP, // whether or not there is a neighbour voxel at coords { X , Y - 1, Z + 1 }
x0y0zM, // whether or not there is a neighbour voxel at coords { X , Y , Z - 1 }
x0y0zP, // whether or not there is a neighbour voxel at coords { X , Y , Z + 1 }
x0yPzM, // whether or not there is a neighbour voxel at coords { X , Y + 1, Z - 1 }
x0yPz0, // whether or not there is a neighbour voxel at coords { X , Y + 1, Z }
x0yPzP, // whether or not there is a neighbour voxel at coords { X , Y + 1, Z + 1 }
xPyMzM, // whether or not there is a neighbour voxel at coords { X + 1, Y - 1, Z - 1 }
xPyMz0, // whether or not there is a neighbour voxel at coords { X + 1, Y - 1, Z }
xPyMzP, // whether or not there is a neighbour voxel at coords { X + 1, Y - 1, Z + 1 }
xPy0zM, // whether or not there is a neighbour voxel at coords { X + 1, Y , Z - 1 }
xPy0z0, // whether or not there is a neighbour voxel at coords { X + 1, Y , Z }
xPy0zP, // whether or not there is a neighbour voxel at coords { X + 1, Y , Z + 1 }
xPyPzM, // whether or not there is a neighbour voxel at coords { X + 1, Y + 1, Z - 1 }
xPyPz0, // whether or not there is a neighbour voxel at coords { X + 1, Y + 1, Z }
xPyPzP, // whether or not there is a neighbour voxel at coords { X + 1, Y + 1, Z + 1 }
}

/**
Expand Down

0 comments on commit d703487

Please sign in to comment.