directiontables.cpp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. Minetest
  3. Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU Lesser General Public License as published by
  6. the Free Software Foundation; either version 2.1 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public License along
  13. with this program; if not, write to the Free Software Foundation, Inc.,
  14. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  15. */
  16. #include "directiontables.h"
  17. const v3s16 g_6dirs[6] =
  18. {
  19. // +right, +top, +back
  20. v3s16( 0, 0, 1), // back
  21. v3s16( 0, 1, 0), // top
  22. v3s16( 1, 0, 0), // right
  23. v3s16( 0, 0,-1), // front
  24. v3s16( 0,-1, 0), // bottom
  25. v3s16(-1, 0, 0) // left
  26. };
  27. const v3s16 g_7dirs[7] =
  28. {
  29. v3s16(0,0,1), // back
  30. v3s16(0,1,0), // top
  31. v3s16(1,0,0), // right
  32. v3s16(0,0,-1), // front
  33. v3s16(0,-1,0), // bottom
  34. v3s16(-1,0,0), // left
  35. v3s16(0,0,0), // self
  36. };
  37. const v3s16 g_26dirs[26] =
  38. {
  39. // +right, +top, +back
  40. v3s16( 0, 0, 1), // back
  41. v3s16( 0, 1, 0), // top
  42. v3s16( 1, 0, 0), // right
  43. v3s16( 0, 0,-1), // front
  44. v3s16( 0,-1, 0), // bottom
  45. v3s16(-1, 0, 0), // left
  46. // 6
  47. v3s16(-1, 1, 0), // top left
  48. v3s16( 1, 1, 0), // top right
  49. v3s16( 0, 1, 1), // top back
  50. v3s16( 0, 1,-1), // top front
  51. v3s16(-1, 0, 1), // back left
  52. v3s16( 1, 0, 1), // back right
  53. v3s16(-1, 0,-1), // front left
  54. v3s16( 1, 0,-1), // front right
  55. v3s16(-1,-1, 0), // bottom left
  56. v3s16( 1,-1, 0), // bottom right
  57. v3s16( 0,-1, 1), // bottom back
  58. v3s16( 0,-1,-1), // bottom front
  59. // 18
  60. v3s16(-1, 1, 1), // top back-left
  61. v3s16( 1, 1, 1), // top back-right
  62. v3s16(-1, 1,-1), // top front-left
  63. v3s16( 1, 1,-1), // top front-right
  64. v3s16(-1,-1, 1), // bottom back-left
  65. v3s16( 1,-1, 1), // bottom back-right
  66. v3s16(-1,-1,-1), // bottom front-left
  67. v3s16( 1,-1,-1), // bottom front-right
  68. // 26
  69. };
  70. const v3s16 g_27dirs[27] =
  71. {
  72. // +right, +top, +back
  73. v3s16( 0, 0, 1), // back
  74. v3s16( 0, 1, 0), // top
  75. v3s16( 1, 0, 0), // right
  76. v3s16( 0, 0,-1), // front
  77. v3s16( 0,-1, 0), // bottom
  78. v3s16(-1, 0, 0), // left
  79. // 6
  80. v3s16(-1, 1, 0), // top left
  81. v3s16( 1, 1, 0), // top right
  82. v3s16( 0, 1, 1), // top back
  83. v3s16( 0, 1,-1), // top front
  84. v3s16(-1, 0, 1), // back left
  85. v3s16( 1, 0, 1), // back right
  86. v3s16(-1, 0,-1), // front left
  87. v3s16( 1, 0,-1), // front right
  88. v3s16(-1,-1, 0), // bottom left
  89. v3s16( 1,-1, 0), // bottom right
  90. v3s16( 0,-1, 1), // bottom back
  91. v3s16( 0,-1,-1), // bottom front
  92. // 18
  93. v3s16(-1, 1, 1), // top back-left
  94. v3s16( 1, 1, 1), // top back-right
  95. v3s16(-1, 1,-1), // top front-left
  96. v3s16( 1, 1,-1), // top front-right
  97. v3s16(-1,-1, 1), // bottom back-left
  98. v3s16( 1,-1, 1), // bottom back-right
  99. v3s16(-1,-1,-1), // bottom front-left
  100. v3s16( 1,-1,-1), // bottom front-right
  101. // 26
  102. v3s16(0,0,0),
  103. };