#pragma once #include #include #include #include class Circle; namespace PlanimetryCalculus { enum IntersectType{InsideNoIntersection, InsideTouching, InsideIntersection, OutsideIntersection, OutsideTouching, OutsideNoIntersection, CirclesEqual, //Circle Circle intersection NoIntersection, Tangent, Secant, // Circle Line Intersetion Error // general }; void rotatePoint(QPointF &point, double alpha); void rotatePoint(QList &point, double alpha); void rotatePointDegree(QPointF &point, double alpha); void rotatePointDegree(QList &points, double alpha); IntersectType intersects(const Circle &circle1, const Circle &circle2); IntersectType intersects(const Circle &circle1, const Circle &circle2, QList &intersectionPoints); IntersectType intersects(const Circle &circle, const QLineF &line); IntersectType intersects(const Circle &circle, const QLineF &line, QList &intersectionPoints); double distance(const QPointF &p1, const QPointF p2); double angle(const QPointF &p1, const QPointF p2); double angleDegree(const QPointF &p1, const QPointF p2); double truncateAngle(double angle); double truncateAngleDegree(double angle); }