summaryrefslogtreecommitdiff
path: root/src/util/directiontables.h
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2017-06-03 14:55:10 -0400
committerShadowNinja <shadowninja@minetest.net>2017-06-03 14:55:10 -0400
commitcaecdb681c428c1aab9c0f7eec2570c0460f995c (patch)
treee5115982ea59bbf2343ba9b35bc4a0cfbb56f407 /src/util/directiontables.h
parent81d56b94919dceb7b2e51d70b21a7ca22f852bd5 (diff)
parent80dc961d24e1964e25d57039ddb2ba639f9f4d22 (diff)
downloadminetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.tar.gz
minetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.tar.bz2
minetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.zip
Merge 0.4.16 into stable-0.4
Diffstat (limited to 'src/util/directiontables.h')
-rw-r--r--src/util/directiontables.h56
1 files changed, 55 insertions, 1 deletions
diff --git a/src/util/directiontables.h b/src/util/directiontables.h
index 0dd3aab09..3cfe0fb3e 100644
--- a/src/util/directiontables.h
+++ b/src/util/directiontables.h
@@ -30,5 +30,59 @@ extern const v3s16 g_26dirs[26];
// 26th is (0,0,0)
extern const v3s16 g_27dirs[27];
-#endif
+/// Direction in the 6D format. g_27dirs contains corresponding vectors.
+/// Here P means Positive, N stands for Negative.
+enum Direction6D {
+// 0
+ D6D_ZP,
+ D6D_YP,
+ D6D_XP,
+ D6D_ZN,
+ D6D_YN,
+ D6D_XN,
+// 6
+ D6D_XN_YP,
+ D6D_XP_YP,
+ D6D_YP_ZP,
+ D6D_YP_ZN,
+ D6D_XN_ZP,
+ D6D_XP_ZP,
+ D6D_XN_ZN,
+ D6D_XP_ZN,
+ D6D_XN_YN,
+ D6D_XP_YN,
+ D6D_YN_ZP,
+ D6D_YN_ZN,
+// 18
+ D6D_XN_YP_ZP,
+ D6D_XP_YP_ZP,
+ D6D_XN_YP_ZN,
+ D6D_XP_YP_ZN,
+ D6D_XN_YN_ZP,
+ D6D_XP_YN_ZP,
+ D6D_XN_YN_ZN,
+ D6D_XP_YN_ZN,
+// 26
+ D6D,
+
+// aliases
+ D6D_BACK = D6D_ZP,
+ D6D_TOP = D6D_YP,
+ D6D_RIGHT = D6D_XP,
+ D6D_FRONT = D6D_ZN,
+ D6D_BOTTOM = D6D_YN,
+ D6D_LEFT = D6D_XN,
+};
+/// Direction in the wallmounted format.
+/// P is Positive, N is Negative.
+enum DirectionWallmounted {
+ DWM_YP,
+ DWM_YN,
+ DWM_XP,
+ DWM_XN,
+ DWM_ZP,
+ DWM_ZN,
+};
+
+#endif