File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
src/geode/inspector/criterion/negative_elements Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 27
27
#include < geode/basic/pimpl_impl.hpp>
28
28
#include < geode/basic/uuid.hpp>
29
29
30
+ #include < geode/geometry/basic_objects/polygon.hpp>
30
31
#include < geode/geometry/basic_objects/triangle.hpp>
31
32
#include < geode/geometry/information.hpp>
32
33
#include < geode/geometry/sign.hpp>
@@ -71,16 +72,8 @@ namespace geode
71
72
private:
72
73
bool polygon_has_negative_area ( index_t polygon_id ) const
73
74
{
74
- if ( mesh_.nb_polygon_vertices ( polygon_id ) == 4 )
75
- {
76
- Triangle< dimension > triangle{
77
- mesh_.point ( mesh_.polygon_vertex ( { polygon_id, 0 } ) ),
78
- mesh_.point ( mesh_.polygon_vertex ( { polygon_id, 1 } ) ),
79
- mesh_.point ( mesh_.polygon_vertex ( { polygon_id, 2 } ) )
80
- };
81
- return triangle_area_sign ( triangle ) == Sign::negative;
82
- }
83
- return mesh_.polygon_area ( polygon_id ) < 0 ;
75
+ return polygon_area_sign ( mesh_.polygon ( polygon_id ) )
76
+ == Sign::negative;
84
77
}
85
78
86
79
private:
You can’t perform that action at this time.
0 commit comments