Engauge Digitizer 2
|
Base class for all geometry strategies. More...
#include <GeometryStrategyAbstractBase.h>
Public Member Functions | |
GeometryStrategyAbstractBase () | |
Single constructor. | |
virtual | ~GeometryStrategyAbstractBase () |
virtual void | calculateGeometry (const Points &points, const DocumentModelCoords &modelCoords, const DocumentModelGeneral &modelGeneral, const MainWindowModel &modelMainWindow, const Transformation &transformation, QString &funcArea, QString &polyArea, QVector< QString > &x, QVector< QString > &y, QVector< bool > &isPotentialExportAmbiguity, QVector< QString > &distanceGraphForward, QVector< QString > &distancePercentForward, QVector< QString > &distanceGraphBackward, QVector< QString > &distancePercentBackward) const =0 |
Calculate geometry parameters. | |
Base class for all geometry strategies.
Each strategy computes geometry parameters according to the curve's settings.
The numbering for the strategies is specified as the CurveConnectAs enumeration
Definition at line 24 of file GeometryStrategyAbstractBase.h.
GeometryStrategyAbstractBase::GeometryStrategyAbstractBase | ( | ) |
|
virtual |
Definition at line 23 of file GeometryStrategyAbstractBase.cpp.
|
pure virtual |
Calculate geometry parameters.
Implemented in GeometryStrategyFunctionSmooth, GeometryStrategyFunctionStraight, GeometryStrategyRelationSmooth, and GeometryStrategyRelationStraight.
|
protected |
Convert screen positions to graph positions.
Definition at line 27 of file GeometryStrategyAbstractBase.cpp.
|
protected |
Use trapezoidal approximation to compute area under the function. Does not apply to relation.
Definition at line 45 of file GeometryStrategyAbstractBase.cpp.
|
protected |
Insert the specified number of subintervals into each interval.
For straight curves subintervalsPerInterval=1 so the linearity is maintained, and for smooth curves subintervalsPerInterval>1 so the geometry calculations take into account the curvature(s) of the line
Definition at line 61 of file GeometryStrategyAbstractBase.cpp.
|
protectedvirtual |
Load isPotentialExportAmbiguity vector. Default in base class is to load false values since there are no ambiguities.
Definition at line 136 of file GeometryStrategyAbstractBase.cpp.
|
protected |
Load x and y coordinate vectors.
Definition at line 146 of file GeometryStrategyAbstractBase.cpp.
|
protected |
Area in polygon using Shoelace formula, which only works if polygon is simply connected.
We do not check to see if the polygon is simply connected since that would be (1) slow and (2) much work
Definition at line 176 of file GeometryStrategyAbstractBase.cpp.