src/geometry.h

changeset 168
24590af32ad6
parent 123
e3fe3617b631
child 187
30204975694a
equal deleted inserted replaced
167:c1ff4f107569 168:24590af32ad6
1 #pragma once 1 #pragma once
2 #include <QPolygonF>
2 #include "basics.h" 3 #include "basics.h"
3 4
4 namespace geom 5 namespace geom
5 { 6 {
6 struct Plane 7 struct Plane
92 LineSegment2D top(const QRectF& rectangle); 93 LineSegment2D top(const QRectF& rectangle);
93 LineSegment2D bottom(const QRectF& rectangle); 94 LineSegment2D bottom(const QRectF& rectangle);
94 LineSegment2D left(const QRectF& rectangle); 95 LineSegment2D left(const QRectF& rectangle);
95 LineSegment2D right(const QRectF& rectangle); 96 LineSegment2D right(const QRectF& rectangle);
96 bool isConvex(const std::vector<glm::vec3>& polygon); 97 bool isConvex(const std::vector<glm::vec3>& polygon);
98 Winding winding(const QPolygonF& polygon);
97 struct ScalingExtract 99 struct ScalingExtract
98 { 100 {
99 glm::vec3 scaling; 101 glm::vec3 scaling;
100 glm::mat4 unscaled; 102 glm::mat4 unscaled;
101 }; 103 };

mercurial