-
- switch (face) {
-
- default:
- // error
- break;
-
- case Block::FACE_LEFT:
- for (int z = 0; z < depth; ++z) {
- for (int y = 0; y < height; ++y) {
- Pos my_pos(0, y, z);
- Pos other_pos(width - 1, y, z);
- edge_light(*this, my_pos, other, other_pos);
- edge_light(other, other_pos, *this, my_pos);
- }
- }
- break;
-
- case Block::FACE_RIGHT:
- for (int z = 0; z < depth; ++z) {
- for (int y = 0; y < height; ++y) {
- Pos my_pos(width - 1, y, z);
- Pos other_pos(0, y, z);
- edge_light(*this, my_pos, other, other_pos);
- edge_light(other, other_pos, *this, my_pos);
- }
- }
- break;
-
- case Block::FACE_DOWN:
- for (int z = 0; z < depth; ++z) {
- for (int x = 0; x < width; ++x) {
- Pos my_pos(x, 0, z);
- Pos other_pos(x, height - 1, z);
- edge_light(*this, my_pos, other, other_pos);
- edge_light(other, other_pos, *this, my_pos);
- }
- }
- break;
-
- case Block::FACE_UP:
- for (int z = 0; z < depth; ++z) {
- for (int x = 0; x < width; ++x) {
- Pos my_pos(x, height - 1, z);
- Pos other_pos(x, 0, z);
- edge_light(*this, my_pos, other, other_pos);
- edge_light(other, other_pos, *this, my_pos);
- }
- }
- break;
-
- case Block::FACE_BACK:
- for (int y = 0; y < height; ++y) {
- for (int x = 0; x < width; ++x) {
- Pos my_pos(x, y, 0);
- Pos other_pos(x, y, depth - 1);
- edge_light(*this, my_pos, other, other_pos);
- edge_light(other, other_pos, *this, my_pos);
- }
- }
- break;
-
- case Block::FACE_FRONT:
- for (int y = 0; y < height; ++y) {
- for (int x = 0; x < width; ++x) {
- Pos my_pos(x, y, depth - 1);
- Pos other_pos(x, y, 0);
- edge_light(*this, my_pos, other, other_pos);
- edge_light(other, other_pos, *this, my_pos);
- }
- }
- break;
-
- }
- work_light();