]> git.lizzy.rs Git - minetest.git/blob - src/util/directiontables.h
Lint fix
[minetest.git] / src / util / directiontables.h
1 /*
2 Minetest
3 Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #pragma once
21
22 #include "../irrlichttypes.h"
23 #include "../irr_v3d.h"
24
25 extern const v3s16 g_6dirs[6];
26
27 extern const v3s16 g_7dirs[7];
28
29 extern const v3s16 g_26dirs[26];
30
31 // 26th is (0,0,0)
32 extern const v3s16 g_27dirs[27];
33
34 /// Direction in the 6D format. g_27dirs contains corresponding vectors.
35 /// Here P means Positive, N stands for Negative.
36 enum Direction6D {
37 // 0
38         D6D_ZP,
39         D6D_YP,
40         D6D_XP,
41         D6D_ZN,
42         D6D_YN,
43         D6D_XN,
44 // 6
45         D6D_XN_YP,
46         D6D_XP_YP,
47         D6D_YP_ZP,
48         D6D_YP_ZN,
49         D6D_XN_ZP,
50         D6D_XP_ZP,
51         D6D_XN_ZN,
52         D6D_XP_ZN,
53         D6D_XN_YN,
54         D6D_XP_YN,
55         D6D_YN_ZP,
56         D6D_YN_ZN,
57 // 18
58         D6D_XN_YP_ZP,
59         D6D_XP_YP_ZP,
60         D6D_XN_YP_ZN,
61         D6D_XP_YP_ZN,
62         D6D_XN_YN_ZP,
63         D6D_XP_YN_ZP,
64         D6D_XN_YN_ZN,
65         D6D_XP_YN_ZN,
66 // 26
67         D6D,
68
69 // aliases
70         D6D_BACK   = D6D_ZP,
71         D6D_TOP    = D6D_YP,
72         D6D_RIGHT  = D6D_XP,
73         D6D_FRONT  = D6D_ZN,
74         D6D_BOTTOM = D6D_YN,
75         D6D_LEFT   = D6D_XN,
76 };
77
78 /// Direction in the wallmounted format.
79 /// P is Positive, N is Negative.
80 enum DirectionWallmounted {
81         DWM_YP,
82         DWM_YN,
83         DWM_XP,
84         DWM_XN,
85         DWM_ZP,
86         DWM_ZN,
87 };