Engauge Digitizer 2
Loading...
Searching...
No Matches
CentipedeEndpointsPolar.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2020 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef CENTIPEDE_ENDPOINTS_POLAR_H
8#define CENTIPEDE_ENDPOINTS_POLAR_H
9
12#include "DocumentModelCoords.h"
14#include <QPointF>
15#include "Transformation.h"
16
18
21{
22public:
27 const QPointF &posClickScreen,
28 const QPointF &posOriginScreen);
29 virtual ~CentipedeEndpointsPolar ();
30
33 const QPointF &posClickScreen,
34 double &angleRotation,
35 QRectF &rectBounding,
36 CentipedeDebugPolar &DebugPolar);
37
38
40 QPointF posScreenConstantRForHighT (double radius) const;
41
43 QPointF posScreenConstantRForLowT (double radius) const;
44
47 void posScreenConstantRHighLow (double radiusAboutClick,
48 QPointF &posLow,
49 QPointF &posHigh) const;
50
52 void posScreenConstantTForRHighLow (double radius,
53 QPointF &posLow,
54 QPointF &posHigh) const;
55
56private:
58
59 double closestAngleToCentralAngle (double angleCenter,
60 double angleOld) const;
61
63 void generatePreviousAndNextPointsConstantR (double radius,
64 int iPrevious,
65 int iNext,
66 QPointF &posGraphPrevious,
67 QPointF &posGraphNext,
68 QPointF &posScreen) const;
69
71 QPointF posScreenConstantRCommon (double radius,
72 CentipedeIntersectionType intersectionType) const;
73
74 double rAtOrigin () const;
75 double tAtOrigin () const;
76
77 DocumentModelCoords m_modelCoords;
78 QPointF m_posOriginScreen;
79};
80
81#endif // CENTIPEDE_ENDPOINTS_POLAR_H
CentipedeIntersectionType
Intersect with one of the following XT or YT coordinates for constant YR or XT respectively.
Class for collecting and then displaying debug information computed during constant R ellipse calcula...
QPointF posClickScreen() const
Center of circle in screen coordinates.
const DocumentModelGuideline & modelGuideline() const
Settings.
const Transformation & transformation() const
Transformation which is static through the entire lifetime of the Centipede class instances.
CentipedeEndpointsAbstract(const DocumentModelGuideline &modelGuideline, const Transformation &transformation, const QPointF &posClickScreen)
Constructor with individual coordinates.
CentipedeEndpointsPolar(const DocumentModelCoords &modelCoords, const DocumentModelGuideline &modelGuideline, const Transformation &transformation, const QPointF &posClickScreen, const QPointF &posOriginScreen)
Constructor with individual coordinates.
QPointF posScreenConstantRForLowT(double radius) const
Screen point for R value of circle/coordinate intersection in the decreasing T direction.
void ellipseScreenConstantRForTHighLowAngles(const Transformation &transformation, const QPointF &posClickScreen, double &angleRotation, QRectF &rectBounding, CentipedeDebugPolar &DebugPolar)
Ellipse for R value of circle/coordinate intersection. Start/span angles are calculated separately.
void posScreenConstantRHighLow(double radiusAboutClick, QPointF &posLow, QPointF &posHigh) const
Return two points (posLow and posHigh) where circle around posClickScreen intersects constant-radiusA...
void posScreenConstantTForRHighLow(double radius, QPointF &posLow, QPointF &posHigh) const
Endpoints for radial line segmentin polar coordinates.
QPointF posScreenConstantRForHighT(double radius) const
Screen point for R value of circle/coordinate intersection in the increasing T direction.
Model for DlgSettingsCoords and CmdSettingsCoords.
Model for managing the coordinate values corresponding Guidelines.
Affine transformation between screen and graph coordinates, based on digitized axis points.