Engauge Digitizer
2
Toggle main menu visibility
Loading...
Searching...
No Matches
Centipede
CentipedeSegmentAbstract.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_ABSTRACT_H
8
#define CENTIPEDE_SEGMENT_ABSTRACT_H
9
10
#include "
DocumentModelGuideline.h
"
11
#include <QObject>
12
#include <QPointF>
13
#include "
Transformation.h
"
14
15
class
QGraphicsItem;
16
18
enum
IntersectionType
{
19
INTERSECTION_LOW
,
20
INTERSECTION_CENTER
,
21
INTERSECTION_HIGH
22
};
23
28
class
CentipedeSegmentAbstract
:
public
QObject
29
{
30
Q_OBJECT;
31
32
public
:
34
CentipedeSegmentAbstract
(
const
DocumentModelGuideline
&
modelGuideline
,
35
const
Transformation
&
transformation
,
36
const
QPointF &
posClickScreen
);
37
virtual
~CentipedeSegmentAbstract
();
38
40
virtual
double
distanceToClosestEndpoint
(
const
QPointF &posScreen)
const
= 0;
41
43
virtual
void
updateRadius
(
double
radius) = 0;
44
45
protected
:
46
48
double
closestAngleToCentralAngle
(
double
angleCenter,
49
double
angleOld)
const
;
50
52
const
DocumentModelGuideline
&
modelGuideline
()
const
;
53
55
QPointF
posClickScreen
()
const
;
56
58
Transformation
transformation
()
const
;
59
60
private
:
61
CentipedeSegmentAbstract
();
62
63
DocumentModelGuideline
m_modelGuideline;
64
Transformation
m_transformation;
65
QPointF m_posClickScreen;
66
67
};
68
69
#endif
// CENTIPEDE_SEGMENT_ABSTRACT_H
IntersectionType
IntersectionType
Intersect with one of the following XT or YT coordinates for constant YR or XT respectively.
Definition
CentipedeSegmentAbstract.h:18
INTERSECTION_LOW
@ INTERSECTION_LOW
Definition
CentipedeSegmentAbstract.h:19
INTERSECTION_HIGH
@ INTERSECTION_HIGH
Intersection of circle center with XT or YR.
Definition
CentipedeSegmentAbstract.h:21
INTERSECTION_CENTER
@ INTERSECTION_CENTER
Intersection along circle perimeter with lowest value of XT or YR.
Definition
CentipedeSegmentAbstract.h:20
DocumentModelGuideline.h
Transformation.h
CentipedeSegmentAbstract::posClickScreen
QPointF posClickScreen() const
Center of circle in screen coordinates.
Definition
CentipedeSegmentAbstract.cpp:48
CentipedeSegmentAbstract::closestAngleToCentralAngle
double closestAngleToCentralAngle(double angleCenter, double angleOld) const
Loop to find closest angle to angleCenter.
Definition
CentipedeSegmentAbstract.cpp:27
CentipedeSegmentAbstract::distanceToClosestEndpoint
virtual double distanceToClosestEndpoint(const QPointF &posScreen) const =0
Return distance to closest endpoint.
CentipedeSegmentAbstract::CentipedeSegmentAbstract
CentipedeSegmentAbstract(const DocumentModelGuideline &modelGuideline, const Transformation &transformation, const QPointF &posClickScreen)
Constructor with individual coordinates.
Definition
CentipedeSegmentAbstract.cpp:14
CentipedeSegmentAbstract::~CentipedeSegmentAbstract
virtual ~CentipedeSegmentAbstract()
Definition
CentipedeSegmentAbstract.cpp:23
CentipedeSegmentAbstract::updateRadius
virtual void updateRadius(double radius)=0
Update geometry to reflect cursor movement.
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
DocumentModelGuideline
Model for managing the coordinate values corresponding Guidelines.
Definition
DocumentModelGuideline.h:22
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