kig
misc/common.h
Go to the documentation of this file.
void calcBorderPoints(Coordinate &p1, Coordinate &p2, const Rect &r)
this sets p1 and p2 to p1' and p2' so that p1'p2' is the same line as p1p2, and so that p1' and p2' a...
Definition: common.cpp:82
Coordinate calcPointOnParallel(const LineData &l, const Coordinate &t)
this returns a point, so that the line through point t and the point returned is parallel with the li...
Definition: common.cpp:47
const Coordinate calcPointProjection(const Coordinate &p, const LineData &l)
this calculates the perpendicular projection of point p on line ab...
Definition: common.cpp:295
bool isOrthogonalTo(const LineData &l) const
Return true if this line is orthogonal to l.
Definition: common.cpp:474
bool lineInRect(const Rect &r, const Coordinate &a, const Coordinate &b, const int width, const ObjectImp *imp, const KigWidget &w)
Is the line, segment, ray or vector inside r ? We need the imp to distinguish between rays...
Definition: common.cpp:401
double calcDistancePointLine(const Coordinate &p, const LineData &l)
calc the distance of point p to the line through a and b...
Definition: common.cpp:302
bool isOnRay(const Coordinate &o, const Coordinate &a, const Coordinate &b, const double fault)
Definition: common.cpp:226
bool isOnArc(const Coordinate &o, const Coordinate &c, const double r, const double sa, const double a, const double fault)
Definition: common.cpp:238
The Coordinate class is the basic class representing a 2D location by its x and y components...
Definition: coordinate.h:33
Coordinate calcIntersectionPoint(const LineData &l, const LineData &m)
this calcs the point where the lines l and m intersect...
Definition: common.cpp:57
const Coordinate calcCenter(const Coordinate &a, const Coordinate &b, const Coordinate &c)
This function calculates the center of the circle going through the three given points.
Definition: common.cpp:366
Coordinate calcPointOnPerpend(const LineData &l, const Coordinate &t)
this returns a point, so that the line through point t and the point returned is perpendicular to the...
Definition: common.cpp:37
double getDoubleFromUser(const QString &caption, const QString &label, double value, QWidget *parent, bool *ok, double min, double max, int decimals)
Here, we define some algorithms which we need in various places...
Definition: common.cpp:349
Coordinate calcRotatedPoint(const Coordinate &a, const Coordinate &c, const double arc)
This calcs the rotation of point a around point c by arc arc.
Definition: common.cpp:315
bool isParallelTo(const LineData &l) const
Return true if this line is parallel to l.
Definition: common.cpp:459
const Coordinate calcCircleLineIntersect(const Coordinate &c, const double sqr, const LineData &l, int side)
this calcs the intersection points of the circle with center c and radius sqrt( r )...
Definition: common.cpp:262
bool isOnSegment(const Coordinate &o, const Coordinate &a, const Coordinate &b, const double fault)
is o on the segment defined by point a and point b ? this calls isOnLine(), but also checks if o is "...
Definition: common.cpp:212
bool isOnLine(const Coordinate &o, const Coordinate &a, const Coordinate &b, const double fault)
is o on the line defined by point a and point b ? fault is the allowed difference...
Definition: common.cpp:188
bool isSingular(const double &a, const double &b, const double &c, const double &d)
test if a 2x2 matrix is singular (relatively to the norm of the two row vectors)
Definition: common.cpp:495
const Coordinate calcMirrorPoint(const LineData &l, const Coordinate &p)
calc the mirror point of p over the line l
Definition: common.cpp:250
Coordinate calcCircleRadicalStartPoint(const Coordinate &ca, const Coordinate &cb, double sqra, double sqrb)
Definition: common.cpp:335
const Coordinate calcArcLineIntersect(const Coordinate &c, const double sqr, const double sa, const double angle, const LineData &l, int side)
this calcs the intersection points of the arc with center c, radius sqrt( r ), start angle sa and ang...
Definition: common.cpp:285
bool areCollinear(const Coordinate &p1, const Coordinate &p2, const Coordinate &p3)
test collinearity of three points
Definition: common.cpp:489
void calcRayBorderPoints(const Coordinate &a, Coordinate &b, const Rect &r)
this does the same as the above function, but only for b.
Definition: common.cpp:131
The ObjectImp class represents the behaviour of an object after it is calculated. ...
Definition: object_imp.h:226
QObject * parent() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.