Engauge Digitizer
2
Toggle main menu visibility
Loading...
Searching...
No Matches
Centipede
CentipedeSegmentConstantREllipse.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_SEGMENT_CONSTANT_R_ELLIPSE_H
8
#define CENTIPEDE_SEGMENT_CONSTANT_R_ELLIPSE_H
9
10
#include "
CentipedeDebugPolar.h
"
11
#include "
CentipedeSegmentAbstract.h
"
12
13
class
DocumentModelCoords
;
14
class
GraphicsArcItem
;
15
class
GraphicsArcItemRelay
;
16
class
GraphicsScene
;
17
19
class
CentipedeSegmentConstantREllipse
:
public
CentipedeSegmentAbstract
20
{
21
Q_OBJECT;
22
23
public
:
25
CentipedeSegmentConstantREllipse
(
GraphicsScene
&scene,
26
const
DocumentModelCoords
&modelCoords,
27
const
DocumentModelGuideline
&
modelGuideline
,
28
const
Transformation
&
transformation
,
29
const
QPointF &
posClickScreen
);
30
virtual
~CentipedeSegmentConstantREllipse
();
31
32
virtual
double
distanceToClosestEndpoint
(
const
QPointF &posScreen)
const
;
33
virtual
void
updateRadius
(
double
radius);
34
35
signals:
36
38
void
signalUpdateAngles
(QPointF posTangentialLow,
39
QPointF posTangentialCenter,
40
QPointF posTangentialHigh,
41
double
widthToHeight,
42
double
scaling);
43
44
private
:
45
CentipedeSegmentConstantREllipse
();
46
47
void
posScreenConstantRForXTHighLowAngles (
double
radius,
48
const
QPointF &posLow,
49
const
QPointF &posHigh)
const
;
50
51
GraphicsArcItem
*m_graphicsItem;
52
GraphicsArcItemRelay
*m_graphicsItemRelay;
53
54
// Two points where circle around click point intersects constant theta coordinate line
55
QPointF m_posRadialLow;
56
QPointF m_posRadialHigh;
57
58
// Two points where circle around click points intersects constant radius coordinate line
59
QPointF m_posTangentialLow;
60
QPointF m_posTangentialHigh;
61
62
// Origin
63
QPointF m_posOriginScreen;
64
65
// Debugging
66
CentipedeDebugPolar
m_debugPolar;
67
};
68
69
#endif
// CENTIPEDE_SEGMENT_CONSTANT_R_ELLIPSE_H
CentipedeDebugPolar.h
CentipedeSegmentAbstract.h
CentipedeDebugPolar
Class for collecting and then displaying debug information computed during constant R ellipse calcula...
Definition
CentipedeDebugPolar.h:21
CentipedeSegmentAbstract::posClickScreen
QPointF posClickScreen() const
Center of circle in screen coordinates.
Definition
CentipedeSegmentAbstract.cpp:48
CentipedeSegmentAbstract::CentipedeSegmentAbstract
CentipedeSegmentAbstract(const DocumentModelGuideline &modelGuideline, const Transformation &transformation, const QPointF &posClickScreen)
Constructor with individual coordinates.
Definition
CentipedeSegmentAbstract.cpp:14
CentipedeSegmentAbstract::modelGuideline
const DocumentModelGuideline & modelGuideline() const
Settings.
Definition
CentipedeSegmentAbstract.cpp:43
CentipedeSegmentAbstract::transformation
Transformation transformation() const
Transformation which is static through the entire lifetime of the Centipede class instances.
Definition
CentipedeSegmentAbstract.cpp:53
CentipedeSegmentConstantREllipse::CentipedeSegmentConstantREllipse
CentipedeSegmentConstantREllipse(GraphicsScene &scene, const DocumentModelCoords &modelCoords, const DocumentModelGuideline &modelGuideline, const Transformation &transformation, const QPointF &posClickScreen)
Constructor with individual coordinates.
Definition
CentipedeSegmentConstantREllipse.cpp:21
CentipedeSegmentConstantREllipse::distanceToClosestEndpoint
virtual double distanceToClosestEndpoint(const QPointF &posScreen) const
Return distance to closest endpoint.
Definition
CentipedeSegmentConstantREllipse.cpp:100
CentipedeSegmentConstantREllipse::updateRadius
virtual void updateRadius(double radius)
Update geometry to reflect cursor movement.
Definition
CentipedeSegmentConstantREllipse.cpp:108
CentipedeSegmentConstantREllipse::~CentipedeSegmentConstantREllipse
virtual ~CentipedeSegmentConstantREllipse()
Definition
CentipedeSegmentConstantREllipse.cpp:94
CentipedeSegmentConstantREllipse::signalUpdateAngles
void signalUpdateAngles(QPointF posTangentialLow, QPointF posTangentialCenter, QPointF posTangentialHigh, double widthToHeight, double scaling)
Send new geometry for later updating.
DocumentModelCoords
Model for DlgSettingsCoords and CmdSettingsCoords.
Definition
DocumentModelCoords.h:21
DocumentModelGuideline
Model for managing the coordinate values corresponding Guidelines.
Definition
DocumentModelGuideline.h:22
GraphicsArcItemRelay
Enable postponed geometry changes for GraphicsArcItem, using a signal to trigger this class to update...
Definition
GraphicsArcItemRelay.h:22
GraphicsArcItem
Draw an arc as an ellipse but without lines from the center to the start and end points.
Definition
GraphicsArcItem.h:20
GraphicsScene
Add point and line handling to generic QGraphicsScene.
Definition
GraphicsScene.h:37
Transformation
Affine transformation between screen and graph coordinates, based on digitized axis points.
Definition
Transformation.h:32
Generated on
for Engauge Digitizer by
1.17.0