1use super::super::super::EnumTrait;
2use std::str::FromStr;
3#[derive(Clone, Debug)]
4pub enum PresetCameraValues {
5 IsometricBottomDown,
6 IsometricBottomUp,
7 IsometricLeftDown,
8 IsometricLeftUp,
9 IsometricOffAxis1Left,
10 IsometricOffAxis1Right,
11 IsometricOffAxis1Top,
12 IsometricOffAxis2Left,
13 IsometricOffAxis2Right,
14 IsometricOffAxis2Top,
15 IsometricOffAxis3Bottom,
16 IsometricOffAxis3Left,
17 IsometricOffAxis3Right,
18 IsometricOffAxis4Bottom,
19 IsometricOffAxis4Left,
20 IsometricOffAxis4Right,
21 IsometricRightDown,
22 IsometricRightUp,
23 IsometricTopDown,
24 IsometricTopUp,
25 LegacyObliqueBottom,
26 LegacyObliqueBottomLeft,
27 LegacyObliqueBottomRight,
28 LegacyObliqueFront,
29 LegacyObliqueLeft,
30 LegacyObliqueRight,
31 LegacyObliqueTop,
32 LegacyObliqueTopLeft,
33 LegacyObliqueTopRight,
34 LegacyPerspectiveBottom,
35 LegacyPerspectiveBottomLeft,
36 LegacyPerspectiveBottomRight,
37 LegacyPerspectiveFront,
38 LegacyPerspectiveLeft,
39 LegacyPerspectiveRight,
40 LegacyPerspectiveTop,
41 LegacyPerspectiveTopLeft,
42 LegacyPerspectiveTopRight,
43 ObliqueBottom,
44 ObliqueBottomLeft,
45 ObliqueBottomRight,
46 ObliqueLeft,
47 ObliqueRight,
48 ObliqueTop,
49 ObliqueTopLeft,
50 ObliqueTopRight,
51 OrthographicFront,
52 PerspectiveAbove,
53 PerspectiveAboveLeftFacing,
54 PerspectiveAboveRightFacing,
55 PerspectiveBelow,
56 PerspectiveContrastingLeftFacing,
57 PerspectiveContrastingRightFacing,
58 PerspectiveFront,
59 PerspectiveHeroicExtremeLeftFacing,
60 PerspectiveHeroicExtremeRightFacing,
61 PerspectiveHeroicLeftFacing,
62 PerspectiveHeroicRightFacing,
63 PerspectiveLeft,
64 PerspectiveRelaxed,
65 PerspectiveRelaxedModerately,
66 PerspectiveRight,
67}
68impl Default for PresetCameraValues {
69 #[inline]
70 fn default() -> Self {
71 Self::LegacyObliqueTopLeft
72 }
73}
74impl EnumTrait for PresetCameraValues {
75 #[inline]
76 fn get_value_string(&self) -> &str {
77 match &self {
78 Self::IsometricBottomDown => "isometricBottomDown",
79 Self::IsometricBottomUp => "isometricBottomUp",
80 Self::IsometricLeftDown => "isometricLeftDown",
81 Self::IsometricLeftUp => "isometricLeftUp",
82 Self::IsometricOffAxis1Left => "isometricOffAxis1Left",
83 Self::IsometricOffAxis1Right => "isometricOffAxis1Right",
84 Self::IsometricOffAxis1Top => "isometricOffAxis1Top",
85 Self::IsometricOffAxis2Left => "isometricOffAxis2Left",
86 Self::IsometricOffAxis2Right => "isometricOffAxis2Right",
87 Self::IsometricOffAxis2Top => "isometricOffAxis2Top",
88 Self::IsometricOffAxis3Bottom => "isometricOffAxis3Bottom",
89 Self::IsometricOffAxis3Left => "isometricOffAxis3Left",
90 Self::IsometricOffAxis3Right => "isometricOffAxis3Right",
91 Self::IsometricOffAxis4Bottom => "isometricOffAxis4Bottom",
92 Self::IsometricOffAxis4Left => "isometricOffAxis4Left",
93 Self::IsometricOffAxis4Right => "isometricOffAxis4Right",
94 Self::IsometricRightDown => "isometricRightDown",
95 Self::IsometricRightUp => "isometricRightUp",
96 Self::IsometricTopDown => "isometricTopDown",
97 Self::IsometricTopUp => "isometricTopUp",
98 Self::LegacyObliqueBottom => "legacyObliqueBottom",
99 Self::LegacyObliqueBottomLeft => "legacyObliqueBottomLeft",
100 Self::LegacyObliqueBottomRight => "legacyObliqueBottomRight",
101 Self::LegacyObliqueFront => "legacyObliqueFront",
102 Self::LegacyObliqueLeft => "legacyObliqueLeft",
103 Self::LegacyObliqueRight => "legacyObliqueRight",
104 Self::LegacyObliqueTop => "legacyObliqueTop",
105 Self::LegacyObliqueTopLeft => "legacyObliqueTopLeft",
106 Self::LegacyObliqueTopRight => "legacyObliqueTopRight",
107 Self::LegacyPerspectiveBottom => "legacyPerspectiveBottom",
108 Self::LegacyPerspectiveBottomLeft => "legacyPerspectiveBottomLeft",
109 Self::LegacyPerspectiveBottomRight => "legacyPerspectiveBottomRight",
110 Self::LegacyPerspectiveFront => "legacyPerspectiveFront",
111 Self::LegacyPerspectiveLeft => "legacyPerspectiveLeft",
112 Self::LegacyPerspectiveRight => "legacyPerspectiveRight",
113 Self::LegacyPerspectiveTop => "legacyPerspectiveTop",
114 Self::LegacyPerspectiveTopLeft => "legacyPerspectiveTopLeft",
115 Self::LegacyPerspectiveTopRight => "legacyPerspectiveTopRight",
116 Self::ObliqueBottom => "obliqueBottom",
117 Self::ObliqueBottomLeft => "obliqueBottomLeft",
118 Self::ObliqueBottomRight => "obliqueBottomRight",
119 Self::ObliqueLeft => "obliqueLeft",
120 Self::ObliqueRight => "obliqueRight",
121 Self::ObliqueTop => "obliqueTop",
122 Self::ObliqueTopLeft => "obliqueTopLeft",
123 Self::ObliqueTopRight => "obliqueTopRight",
124 Self::OrthographicFront => "orthographicFront",
125 Self::PerspectiveAbove => "perspectiveAbove",
126 Self::PerspectiveAboveLeftFacing => "perspectiveAboveLeftFacing",
127 Self::PerspectiveAboveRightFacing => "perspectiveAboveRightFacing",
128 Self::PerspectiveBelow => "perspectiveBelow",
129 Self::PerspectiveContrastingLeftFacing => "perspectiveContrastingLeftFacing",
130 Self::PerspectiveContrastingRightFacing => "perspectiveContrastingRightFacing",
131 Self::PerspectiveFront => "perspectiveFront",
132 Self::PerspectiveHeroicExtremeLeftFacing => "perspectiveHeroicExtremeLeftFacing",
133 Self::PerspectiveHeroicExtremeRightFacing => "perspectiveHeroicExtremeRightFacing",
134 Self::PerspectiveHeroicLeftFacing => "perspectiveHeroicLeftFacing",
135 Self::PerspectiveHeroicRightFacing => "perspectiveHeroicRightFacing",
136 Self::PerspectiveLeft => "perspectiveLeft",
137 Self::PerspectiveRelaxed => "perspectiveRelaxed",
138 Self::PerspectiveRelaxedModerately => "perspectiveRelaxedModerately",
139 Self::PerspectiveRight => "perspectiveRight",
140 }
141 }
142}
143impl FromStr for PresetCameraValues {
144 type Err = ();
145
146 #[inline]
147 fn from_str(input: &str) -> Result<Self, Self::Err> {
148 match input {
149 "isometricBottomDown" => Ok(Self::IsometricBottomDown),
150 "isometricBottomUp" => Ok(Self::IsometricBottomUp),
151 "isometricLeftDown" => Ok(Self::IsometricLeftDown),
152 "isometricLeftUp" => Ok(Self::IsometricLeftUp),
153 "isometricOffAxis1Left" => Ok(Self::IsometricOffAxis1Left),
154 "isometricOffAxis1Right" => Ok(Self::IsometricOffAxis1Right),
155 "isometricOffAxis1Top" => Ok(Self::IsometricOffAxis1Top),
156 "isometricOffAxis2Left" => Ok(Self::IsometricOffAxis2Left),
157 "isometricOffAxis2Right" => Ok(Self::IsometricOffAxis2Right),
158 "isometricOffAxis2Top" => Ok(Self::IsometricOffAxis2Top),
159 "isometricOffAxis3Bottom" => Ok(Self::IsometricOffAxis3Bottom),
160 "isometricOffAxis3Left" => Ok(Self::IsometricOffAxis3Left),
161 "isometricOffAxis3Right" => Ok(Self::IsometricOffAxis3Right),
162 "isometricOffAxis4Bottom" => Ok(Self::IsometricOffAxis4Bottom),
163 "isometricOffAxis4Left" => Ok(Self::IsometricOffAxis4Left),
164 "isometricOffAxis4Right" => Ok(Self::IsometricOffAxis4Right),
165 "isometricRightDown" => Ok(Self::IsometricRightDown),
166 "isometricRightUp" => Ok(Self::IsometricRightUp),
167 "isometricTopDown" => Ok(Self::IsometricTopDown),
168 "isometricTopUp" => Ok(Self::IsometricTopUp),
169 "legacyObliqueBottom" => Ok(Self::LegacyObliqueBottom),
170 "legacyObliqueBottomLeft" => Ok(Self::LegacyObliqueBottomLeft),
171 "legacyObliqueBottomRight" => Ok(Self::LegacyObliqueBottomRight),
172 "legacyObliqueFront" => Ok(Self::LegacyObliqueFront),
173 "legacyObliqueLeft" => Ok(Self::LegacyObliqueLeft),
174 "legacyObliqueRight" => Ok(Self::LegacyObliqueRight),
175 "legacyObliqueTop" => Ok(Self::LegacyObliqueTop),
176 "legacyObliqueTopLeft" => Ok(Self::LegacyObliqueTopLeft),
177 "legacyObliqueTopRight" => Ok(Self::LegacyObliqueTopRight),
178 "legacyPerspectiveBottom" => Ok(Self::LegacyPerspectiveBottom),
179 "legacyPerspectiveBottomLeft" => Ok(Self::LegacyPerspectiveBottomLeft),
180 "legacyPerspectiveBottomRight" => Ok(Self::LegacyPerspectiveBottomRight),
181 "legacyPerspectiveFront" => Ok(Self::LegacyPerspectiveFront),
182 "legacyPerspectiveLeft" => Ok(Self::LegacyPerspectiveLeft),
183 "legacyPerspectiveRight" => Ok(Self::LegacyPerspectiveRight),
184 "legacyPerspectiveTop" => Ok(Self::LegacyPerspectiveTop),
185 "legacyPerspectiveTopLeft" => Ok(Self::LegacyPerspectiveTopLeft),
186 "legacyPerspectiveTopRight" => Ok(Self::LegacyPerspectiveTopRight),
187 "obliqueBottom" => Ok(Self::ObliqueBottom),
188 "obliqueBottomLeft" => Ok(Self::ObliqueBottomLeft),
189 "obliqueBottomRight" => Ok(Self::ObliqueBottomRight),
190 "obliqueLeft" => Ok(Self::ObliqueLeft),
191 "obliqueRight" => Ok(Self::ObliqueRight),
192 "obliqueTop" => Ok(Self::ObliqueTop),
193 "obliqueTopLeft" => Ok(Self::ObliqueTopLeft),
194 "obliqueTopRight" => Ok(Self::ObliqueTopRight),
195 "orthographicFront" => Ok(Self::OrthographicFront),
196 "perspectiveAbove" => Ok(Self::PerspectiveAbove),
197 "perspectiveAboveLeftFacing" => Ok(Self::PerspectiveAboveLeftFacing),
198 "perspectiveAboveRightFacing" => Ok(Self::PerspectiveAboveRightFacing),
199 "perspectiveBelow" => Ok(Self::PerspectiveBelow),
200 "perspectiveContrastingLeftFacing" => Ok(Self::PerspectiveContrastingLeftFacing),
201 "perspectiveContrastingRightFacing" => Ok(Self::PerspectiveContrastingRightFacing),
202 "perspectiveFront" => Ok(Self::PerspectiveFront),
203 "perspectiveHeroicExtremeLeftFacing" => Ok(Self::PerspectiveHeroicExtremeLeftFacing),
204 "perspectiveHeroicExtremeRightFacing" => Ok(Self::PerspectiveHeroicExtremeRightFacing),
205 "perspectiveHeroicLeftFacing" => Ok(Self::PerspectiveHeroicLeftFacing),
206 "perspectiveHeroicRightFacing" => Ok(Self::PerspectiveHeroicRightFacing),
207 "perspectiveLeft" => Ok(Self::PerspectiveLeft),
208 "perspectiveRelaxed" => Ok(Self::PerspectiveRelaxed),
209 "perspectiveRelaxedModerately" => Ok(Self::PerspectiveRelaxedModerately),
210 "perspectiveRight" => Ok(Self::PerspectiveRight),
211 _ => Err(()),
212 }
213 }
214}