Skip to content

Commit 6697530

Browse files
committed
fix(OG-inspector): renaming enum with uppercase names
1 parent 458d62e commit 6697530

File tree

3 files changed

+44
-44
lines changed

3 files changed

+44
-44
lines changed

src/geode/inspector/criterion/intersections/model_intersections.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,17 @@ namespace
5959
};
6060

6161
geode::local_index_t model_vertex_position_to_index(
62-
geode::Position position )
62+
geode::POSITION position )
6363
{
64-
if( position == geode::Position::vertex0 )
64+
if( position == geode::POSITION::vertex0 )
6565
{
6666
return 0;
6767
}
68-
if( position == geode::Position::vertex1 )
68+
if( position == geode::POSITION::vertex1 )
6969
{
7070
return 1;
7171
}
72-
if( position == geode::Position::vertex2 )
72+
if( position == geode::POSITION::vertex2 )
7373
{
7474
return 2;
7575
}
@@ -92,7 +92,7 @@ namespace
9292
mesh2_( same_surface_
9393
? mesh1_
9494
: surface2_.template mesh<
95-
geode::TriangulatedSurface< Model::dim > >() )
95+
geode::TriangulatedSurface< Model::dim > >() )
9696
{
9797
}
9898

@@ -170,7 +170,7 @@ namespace
170170
const geode::uuid& surface_id1,
171171
const geode::uuid& surface_id2 )
172172
: ModelSurfacesIntersectionBase< Model >(
173-
model, surface_id1, surface_id2 ),
173+
model, surface_id1, surface_id2 ),
174174
same_surface_{ surface_id1 == surface_id2 }
175175
{
176176
}
@@ -208,7 +208,7 @@ namespace
208208
const geode::uuid& surface_id1,
209209
const geode::uuid& surface_id2 )
210210
: ModelSurfacesIntersectionBase< Model >(
211-
model, surface_id1, surface_id2 ),
211+
model, surface_id1, surface_id2 ),
212212
same_surface_{ surface_id1 == surface_id2 }
213213
{
214214
}
@@ -274,21 +274,21 @@ namespace
274274
if( geode::segment_segment_intersection_detection(
275275
{ common_pt0, t1_third_pt }, { common_pt1, t2_third_pt } )
276276
.first
277-
!= geode::Position::outside
277+
!= geode::POSITION::outside
278278
|| geode::segment_segment_intersection_detection(
279279
{ common_pt1, t1_third_pt },
280280
{ common_pt0, t2_third_pt } )
281281
.first
282-
!= geode::Position::outside )
282+
!= geode::POSITION::outside )
283283
{
284284
return true;
285285
}
286286
const auto t1 = mesh1_.triangle( t1_id );
287287
const auto t2 = mesh2_.triangle( t2_id );
288288
if( geode::point_triangle_position( t1_third_pt, t2 )
289-
!= geode::Position::outside
289+
!= geode::POSITION::outside
290290
|| geode::point_triangle_position( t2_third_pt, t1 )
291-
!= geode::Position::outside )
291+
!= geode::POSITION::outside )
292292
{
293293
return true;
294294
}
@@ -312,8 +312,8 @@ namespace
312312
geode::segment_segment_intersection_detection(
313313
t1_edge, { mesh2_.point( edge2_vertices[0] ),
314314
mesh2_.point( edge2_vertices[1] ) } );
315-
if( edge_edge_inter.first == geode::Position::outside
316-
|| edge_edge_inter.first == geode::Position::parallel )
315+
if( edge_edge_inter.first == geode::POSITION::outside
316+
|| edge_edge_inter.first == geode::POSITION::parallel )
317317
{
318318
continue;
319319
}
@@ -353,7 +353,7 @@ namespace
353353
const auto v2_id = v_id == 2 ? 0 : v_id + 1;
354354
const auto intersection = segment_triangle_intersection_detection(
355355
{ t1.vertices()[v_id], t1.vertices()[v2_id] }, t2 );
356-
if( intersection.first != geode::Position::outside )
356+
if( intersection.first != geode::POSITION::outside )
357357
{
358358
if( common_vertices.size() != 1 )
359359
{
@@ -397,12 +397,12 @@ namespace
397397
if( geode::segment_triangle_intersection_detection(
398398
{ mesh1_.point( common_vertices[0][0] ), t1_third_pt }, t2 )
399399
.first
400-
== geode::Position::parallel
400+
== geode::POSITION::parallel
401401
|| geode::segment_triangle_intersection_detection(
402402
{ mesh1_.point( common_vertices[1][0] ), t1_third_pt },
403403
t2 )
404404
.first
405-
== geode::Position::parallel )
405+
== geode::POSITION::parallel )
406406
{
407407
return true;
408408
}

src/geode/inspector/criterion/intersections/surface_curve_intersections.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ namespace
130130
{
131131
if( geode::point_triangle_position(
132132
segment.vertices()[ev].get(), triangle )
133-
== geode::Position::inside )
133+
== geode::POSITION::inside )
134134
{
135135
return true;
136136
}
@@ -143,11 +143,11 @@ namespace
143143
surface_.point( edge_vertices[1] ) };
144144
const auto result =
145145
geode::segment_segment_intersection_detection( segment, edge );
146-
if( result.first == geode::Position::inside )
146+
if( result.first == geode::POSITION::inside )
147147
{
148148
return true;
149149
}
150-
if( result.second == geode::Position::inside )
150+
if( result.second == geode::POSITION::inside )
151151
{
152152
return true;
153153
}
@@ -165,41 +165,41 @@ namespace
165165
{
166166
if( geode::point_triangle_position(
167167
segment.vertices()[ev].get(), triangle )
168-
== geode::Position::inside )
168+
== geode::POSITION::inside )
169169
{
170170
return true;
171171
}
172172
}
173173
const auto result =
174174
geode::segment_triangle_intersection_detection( segment, triangle );
175-
if( result.first == geode::Position::outside
176-
|| result.second == geode::Position::outside )
175+
if( result.first == geode::POSITION::outside
176+
|| result.second == geode::POSITION::outside )
177177
{
178178
return false;
179179
}
180180

181-
if( result.first == geode::Position::inside )
181+
if( result.first == geode::POSITION::inside )
182182
{
183183
return true;
184184
}
185185

186-
if( result.second == geode::Position::inside
187-
|| result.second == geode::Position::edge0
188-
|| result.second == geode::Position::edge1
189-
|| result.second == geode::Position::edge2 )
186+
if( result.second == geode::POSITION::inside
187+
|| result.second == geode::POSITION::edge0
188+
|| result.second == geode::POSITION::edge1
189+
|| result.second == geode::POSITION::edge2 )
190190
{
191191
return true;
192192
}
193193

194-
if( result.first == geode::Position::parallel )
194+
if( result.first == geode::POSITION::parallel )
195195
{
196196
for( const auto ev : geode::LRange{ 2 } )
197197
{
198198
const auto position = geode::point_triangle_position(
199199
segment.vertices()[ev].get(), triangle );
200-
if( position != geode::Position::vertex0
201-
&& position != geode::Position::vertex1
202-
&& position != geode::Position::vertex2 )
200+
if( position != geode::POSITION::vertex0
201+
&& position != geode::POSITION::vertex1
202+
&& position != geode::POSITION::vertex2 )
203203
{
204204
return true;
205205
}

src/geode/inspector/criterion/intersections/surface_intersections.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@
4141
namespace
4242
{
4343
geode::local_index_t surface_vertex_position_to_index(
44-
geode::Position position )
44+
geode::POSITION position )
4545
{
46-
if( position == geode::Position::vertex0 )
46+
if( position == geode::POSITION::vertex0 )
4747
{
4848
return 0;
4949
}
50-
if( position == geode::Position::vertex1 )
50+
if( position == geode::POSITION::vertex1 )
5151
{
5252
return 1;
5353
}
54-
if( position == geode::Position::vertex2 )
54+
if( position == geode::POSITION::vertex2 )
5555
{
5656
return 2;
5757
}
@@ -211,21 +211,21 @@ namespace
211211
if( geode::segment_segment_intersection_detection(
212212
{ common_pt0, t1_third_pt }, { common_pt1, t2_third_pt } )
213213
.first
214-
!= geode::Position::outside
214+
!= geode::POSITION::outside
215215
|| geode::segment_segment_intersection_detection(
216216
{ common_pt1, t1_third_pt },
217217
{ common_pt0, t2_third_pt } )
218218
.first
219-
!= geode::Position::outside )
219+
!= geode::POSITION::outside )
220220
{
221221
return true;
222222
}
223223
const auto t1 = mesh_.triangle( t1_id );
224224
const auto t2 = mesh_.triangle( t2_id );
225225
if( geode::point_triangle_position( t1_third_pt, t2 )
226-
!= geode::Position::outside
226+
!= geode::POSITION::outside
227227
|| geode::point_triangle_position( t2_third_pt, t1 )
228-
!= geode::Position::outside )
228+
!= geode::POSITION::outside )
229229
{
230230
return true;
231231
}
@@ -249,8 +249,8 @@ namespace
249249
geode::segment_segment_intersection_detection(
250250
t1_edge, { mesh_.point( edge2_vertices[0] ),
251251
mesh_.point( edge2_vertices[1] ) } );
252-
if( edge_edge_inter.first == geode::Position::outside
253-
|| edge_edge_inter.first == geode::Position::parallel )
252+
if( edge_edge_inter.first == geode::POSITION::outside
253+
|| edge_edge_inter.first == geode::POSITION::parallel )
254254
{
255255
continue;
256256
}
@@ -289,7 +289,7 @@ namespace
289289
const auto v2_id = v_id == 2 ? 0 : v_id + 1;
290290
const auto intersection = segment_triangle_intersection_detection(
291291
{ t1.vertices()[v_id], t1.vertices()[v2_id] }, t2 );
292-
if( intersection.first != geode::Position::outside )
292+
if( intersection.first != geode::POSITION::outside )
293293
{
294294
if( common_points.size() != 1 )
295295
{
@@ -331,11 +331,11 @@ namespace
331331
if( geode::segment_triangle_intersection_detection(
332332
{ mesh_.point( common_points[0] ), t1_third_pt }, t2 )
333333
.first
334-
== geode::Position::parallel
334+
== geode::POSITION::parallel
335335
|| geode::segment_triangle_intersection_detection(
336336
{ mesh_.point( common_points[1] ), t1_third_pt }, t2 )
337337
.first
338-
== geode::Position::parallel )
338+
== geode::POSITION::parallel )
339339
{
340340
return true;
341341
}

0 commit comments

Comments
 (0)