Program Listing for File OctreeTables.hpp

Return to documentation for file (include/lvr2/reconstruction/OctreeTables.hpp)

/*
 * OctreeTables.hpp
 *
 *  Created on: 17.01.2019
 *      Author: Benedikt Schumacher
 */

#ifndef OctreeTables_HPP_
#define OctreeTables_HPP_

namespace lvr2
{
const static int octreeNeighborTable[12][3] = {
  {12, 10,  9}, // 0
  {22, 12, 21}, // 1
  {16, 12, 15}, // 2
  { 4,  3, 12}, // 3
  {14, 10, 11}, // 4
  {23, 22, 14}, // 5
  {14, 16, 17}, // 6
  { 4,  5, 14}, // 7
  { 4,  1, 10}, // 8
  {22, 19, 10}, // 9
  { 4,  7, 16}, // 10
  {22, 25, 16}  // 11
};

const static int octreeNeighborVertexTable[12][3] = {
  { 4,  2,  6},
  { 3,  5,  7},
  { 0,  6,  4},
  { 1,  5,  7},
  { 0,  6,  2},
  { 3,  7,  1},
  { 2,  4,  0},
  { 5,  1,  3},
  { 9, 11, 10},
  { 8, 10, 11},
  {11,  9,  8},
  {10,  8,  9}
};

const static int octreeVertexTable[8][3] = {
  {-1, -1, -1},
  { 1, -1, -1},
  { 1,  1, -1},
  {-1,  1, -1},
  {-1, -1,  1},
  { 1, -1,  1},
  { 1,  1,  1},
  {-1,  1,  1}
};

const static int octreeCenterTable[8][3] = {
  {-1, -1, -1},
  { 1, -1, -1},
  {-1,  1, -1},
  { 1,  1, -1},
  {-1, -1,  1},
  { 1, -1,  1},
  {-1,  1,  1},
  { 1,  1,  1}
};

const static int octreeCornerNeighborTable[64][3] = {
  // 0
  {-1, -1, -1},
  { 0, -1, -1},
  {-1,  0, -1},
  { 0,  0, -1},
  {-1, -1,  0},
  { 0, -1,  0},
  {-1,  0,  0},
  { 0,  0,  0},
  // 1
  { 0, -1, -1},
  { 1, -1, -1},
  { 0,  0, -1},
  { 1,  0, -1},
  { 0, -1,  0},
  { 1, -1,  0},
  { 0,  0,  0},
  { 1,  0,  0},
  // 2
  {-1,  0, -1},
  { 0,  0, -1},
  {-1,  1, -1},
  { 0,  1, -1},
  {-1,  0,  0},
  { 0,  0,  0},
  {-1,  1,  0},
  { 0,  1,  0},
  // 3
  { 0,  0, -1},
  { 1,  0, -1},
  { 0,  1, -1},
  { 1,  1, -1},
  { 0,  0,  0},
  { 1,  0,  0},
  { 0,  1,  0},
  { 1,  1,  0},
  // 4
  {-1, -1,  0},
  { 0, -1,  0},
  {-1,  0,  0},
  { 0,  0,  0},
  {-1, -1,  1},
  { 0, -1,  1},
  {-1,  0,  1},
  { 0,  0,  1},
  // 5
  { 0, -1,  0},
  { 1, -1,  0},
  { 0,  0,  0},
  { 1,  0,  0},
  { 0, -1,  1},
  { 1, -1,  1},
  { 0,  0,  1},
  { 1,  0,  1},
  // 6
  {-1,  0,  0},
  { 0,  0,  0},
  {-1,  1,  0},
  { 0,  1,  0},
  {-1,  0,  1},
  { 0,  0,  1},
  {-1,  1,  1},
  { 0,  1,  1},
  // 7
  { 0,  0,  0},
  { 1,  0,  0},
  { 0,  1,  0},
  { 1,  1,  0},
  { 0,  0,  1},
  { 1,  0,  1},
  { 0,  1,  1},
  { 1,  1,  1}
};

const static int edgeDistanceTable[12][2] = {
  {0, 1},
  {0, 2},
  {0, 4},
  {1, 3},
  {1, 3},
  {2, 3},
  {2, 6},
  {3, 7},
  {4, 5},
  {4, 6},
  {5, 7},
  {6, 7}
};

} // namespace lvr2

#endif /* OctreeTables_HPP_ */