1#![expect(non_snake_case)]
2
3use crate::{components, view_coordinates::ViewDir};
4
5use super::ViewCoordinates;
6
7macro_rules! define_coordinates {
8 ($docstring:literal, $name:ident => ($x:ident, $y:ident, $z:ident) ) => {
9 #[doc = $docstring]
10 pub fn $name() -> Self {
11 Self::new(components::ViewCoordinates::new(
12 ViewDir::$x,
13 ViewDir::$y,
14 ViewDir::$z,
15 ))
16 }
17 };
18}
19
20impl ViewCoordinates {
21 define_coordinates!("X=Up, Y=Left, Z=Forward
24
25⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", ULF => (Up, Left, Forward));
26 define_coordinates!("X=Up, Y=Forward, Z=Left", UFL => (Up, Forward, Left));
27 define_coordinates!("X=Left, Y=Up, Z=Forward", LUF => (Left, Up, Forward));
28 define_coordinates!("X=Left, Y=Forward, Z=Up
29
30⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LFU => (Left, Forward, Up));
31 define_coordinates!("X=Forward, Y=Up, Z=Left
32
33⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", FUL => (Forward, Up, Left));
34 define_coordinates!("X=Forward, Y=Left, Z=Up", FLU => (Forward, Left, Up));
35 define_coordinates!("X=Up, Y=Left, Z=Back", ULB => (Up, Left, Back));
36 define_coordinates!("X=Up, Y=Back, Z=Left
37
38⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", UBL => (Up, Back, Left));
39 define_coordinates!("X=Left, Y=Up, Z=Back
40
41⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LUB => (Left, Up, Back));
42 define_coordinates!("X=Left, Y=Back, Z=Up", LBU => (Left, Back, Up));
43 define_coordinates!("X=Back, Y=Up, Z=Left", BUL => (Back, Up, Left));
44 define_coordinates!("X=Back, Y=Left, Z=Up
45
46⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", BLU => (Back, Left, Up));
47 define_coordinates!("X=Up, Y=Right, Z=Forward", URF => (Up, Right, Forward));
48 define_coordinates!("X=Up, Y=Forward, Z=Right
49
50⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", UFR => (Up, Forward, Right));
51 define_coordinates!("X=Right, Y=Up, Z=Forward
52
53⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", RUF => (Right, Up, Forward));
54 define_coordinates!("X=Right, Y=Forward, Z=Up", RFU => (Right, Forward, Up));
55 define_coordinates!("X=Forward, Y=Up, Z=Right", FUR => (Forward, Up, Right));
56 define_coordinates!("X=Forward, Y=Right, Z=Up
57
58⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", FRU => (Forward, Right, Up));
59 define_coordinates!("X=Up, Y=Right, Z=Back
60
61⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", URB => (Up, Right, Back));
62 define_coordinates!("X=Up, Y=Back, Z=Right", UBR => (Up, Back, Right));
63 define_coordinates!("X=Right, Y=Up, Z=Back", RUB => (Right, Up, Back));
64 define_coordinates!("X=Right, Y=Back, Z=Up
65
66⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", RBU => (Right, Back, Up));
67 define_coordinates!("X=Back, Y=Up, Z=Right
68
69⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", BUR => (Back, Up, Right));
70 define_coordinates!("X=Back, Y=Right, Z=Up", BRU => (Back, Right, Up));
71 define_coordinates!("X=Down, Y=Left, Z=Forward", DLF => (Down, Left, Forward));
72 define_coordinates!("X=Down, Y=Forward, Z=Left
73
74⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", DFL => (Down, Forward, Left));
75 define_coordinates!("X=Left, Y=Down, Z=Forward
76
77⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LDF => (Left, Down, Forward));
78 define_coordinates!("X=Left, Y=Forward, Z=Down", LFD => (Left, Forward, Down));
79 define_coordinates!("X=Forward, Y=Down, Z=Left", FDL => (Forward, Down, Left));
80 define_coordinates!("X=Forward, Y=Left, Z=Down
81
82⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", FLD => (Forward, Left, Down));
83 define_coordinates!("X=Down, Y=Left, Z=Back
84
85⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", DLB => (Down, Left, Back));
86 define_coordinates!("X=Down, Y=Back, Z=Left", DBL => (Down, Back, Left));
87 define_coordinates!("X=Left, Y=Down, Z=Back", LDB => (Left, Down, Back));
88 define_coordinates!("X=Left, Y=Back, Z=Down
89
90⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LBD => (Left, Back, Down));
91 define_coordinates!("X=Back, Y=Down, Z=Left
92
93⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", BDL => (Back, Down, Left));
94 define_coordinates!("X=Back, Y=Left, Z=Down", BLD => (Back, Left, Down));
95 define_coordinates!("X=Down, Y=Right, Z=Forward
96
97⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", DRF => (Down, Right, Forward));
98 define_coordinates!("X=Down, Y=Forward, Z=Right", DFR => (Down, Forward, Right));
99 define_coordinates!("X=Right, Y=Down, Z=Forward", RDF => (Right, Down, Forward));
100 define_coordinates!("X=Right, Y=Forward, Z=Down
101
102⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", RFD => (Right, Forward, Down));
103 define_coordinates!("X=Forward, Y=Down, Z=Right
104
105⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", FDR => (Forward, Down, Right));
106 define_coordinates!("X=Forward, Y=Right, Z=Down", FRD => (Forward, Right, Down));
107 define_coordinates!("X=Down, Y=Right, Z=Back", DRB => (Down, Right, Back));
108 define_coordinates!("X=Down, Y=Back, Z=Right
109
110⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", DBR => (Down, Back, Right));
111 define_coordinates!("X=Right, Y=Down, Z=Back
112
113⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", RDB => (Right, Down, Back));
114 define_coordinates!("X=Right, Y=Back, Z=Down", RBD => (Right, Back, Down));
115 define_coordinates!("X=Back, Y=Down, Z=Right", BDR => (Back, Down, Right));
116 define_coordinates!("X=Back, Y=Right, Z=Down
117
118⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", BRD => (Back, Right, Down));
119 define_coordinates!("X=Up, Y=Right, Z=Forward", RIGHT_HAND_X_UP => (Up, Right, Forward));
120 define_coordinates!("X=Down, Y=Right, Z=Back", RIGHT_HAND_X_DOWN => (Down, Right, Back));
121 define_coordinates!("X=Right, Y=Up, Z=Back", RIGHT_HAND_Y_UP => (Right, Up, Back));
122 define_coordinates!("X=Right, Y=Down, Z=Forward", RIGHT_HAND_Y_DOWN => (Right, Down, Forward));
123 define_coordinates!("X=Right, Y=Forward, Z=Up", RIGHT_HAND_Z_UP => (Right, Forward, Up));
124 define_coordinates!("X=Right, Y=Back, Z=Down", RIGHT_HAND_Z_DOWN => (Right, Back, Down));
125 define_coordinates!("X=Up, Y=Right, Z=Back
126
127⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_X_UP => (Up, Right, Back));
128 define_coordinates!("X=Down, Y=Right, Z=Forward
129
130⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_X_DOWN => (Down, Right, Forward));
131 define_coordinates!("X=Right, Y=Up, Z=Forward
132
133⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_Y_UP => (Right, Up, Forward));
134 define_coordinates!("X=Right, Y=Down, Z=Back
135
136⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_Y_DOWN => (Right, Down, Back));
137 define_coordinates!("X=Right, Y=Back, Z=Up
138
139⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_Z_UP => (Right, Back, Up));
140 define_coordinates!("X=Right, Y=Forward, Z=Down
141
142⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_Z_DOWN => (Right, Forward, Down));
143 }