1 #include "ldrawalgorithm.h" |
1 #include "ldrawalgorithm.h" |
2 #include "linetypes/quadrilateral.h" |
2 #include "linetypes/quadrilateral.h" |
3 #include "linetypes/triangle.h" |
3 #include "linetypes/triangle.h" |
4 |
4 |
5 void ldraw::invert(ModelEditor& editor, ldraw::id_t id) |
5 void ldraw::invert(ModelEditor& editor, ldraw::id_t id, GetPolygonsContext* context) |
6 { |
6 { |
7 editor.modifyObject(id, [](ldraw::Object* object){ |
7 editor.modifyObject(id, [context](ldraw::Object* object){ |
8 object->invert(); |
8 object->invert(context); |
9 }); |
9 }); |
10 } |
10 } |
11 |
11 |
12 static std::array<geom::Triangle, 2> splitTriangles(ldraw::Diagonal diagonal, const std::array<glm::vec3, 4>& points) |
12 static std::array<geom::Triangle, 2> splitTriangles(ldraw::Diagonal diagonal, const std::array<glm::vec3, 4>& points) |
13 { |
13 { |