directiontables.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. #pragma once
  17. #include "../irrlichttypes.h"
  18. #include "../irr_v3d.h"
  19. extern const v3s16 g_6dirs[6];
  20. extern const v3s16 g_7dirs[7];
  21. extern const v3s16 g_26dirs[26];
  22. // 26th is (0,0,0)
  23. extern const v3s16 g_27dirs[27];
  24. /// Direction in the 6D format. g_27dirs contains corresponding vectors.
  25. /// Here P means Positive, N stands for Negative.
  26. enum Direction6D {
  27. // 0
  28. D6D_ZP,
  29. D6D_YP,
  30. D6D_XP,
  31. D6D_ZN,
  32. D6D_YN,
  33. D6D_XN,
  34. // 6
  35. D6D_XN_YP,
  36. D6D_XP_YP,
  37. D6D_YP_ZP,
  38. D6D_YP_ZN,
  39. D6D_XN_ZP,
  40. D6D_XP_ZP,
  41. D6D_XN_ZN,
  42. D6D_XP_ZN,
  43. D6D_XN_YN,
  44. D6D_XP_YN,
  45. D6D_YN_ZP,
  46. D6D_YN_ZN,
  47. // 18
  48. D6D_XN_YP_ZP,
  49. D6D_XP_YP_ZP,
  50. D6D_XN_YP_ZN,
  51. D6D_XP_YP_ZN,
  52. D6D_XN_YN_ZP,
  53. D6D_XP_YN_ZP,
  54. D6D_XN_YN_ZN,
  55. D6D_XP_YN_ZN,
  56. // 26
  57. D6D,
  58. // aliases
  59. D6D_BACK = D6D_ZP,
  60. D6D_TOP = D6D_YP,
  61. D6D_RIGHT = D6D_XP,
  62. D6D_FRONT = D6D_ZN,
  63. D6D_BOTTOM = D6D_YN,
  64. D6D_LEFT = D6D_XN,
  65. };
  66. /// Direction in the wallmounted format.
  67. /// P is Positive, N is Negative.
  68. enum DirectionWallmounted {
  69. DWM_YP,
  70. DWM_YN,
  71. DWM_XP,
  72. DWM_XN,
  73. DWM_ZP,
  74. DWM_ZN,
  75. };