Engauge Digitizer
2
|
Base class for all geometry strategies. More...
#include <GeometryStrategyAbstractBase.h>
Public Member Functions | |
GeometryStrategyAbstractBase () | |
Single constructor. | |
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< QString > &distanceGraphForward, QVector< QString > &distancePercentForward, QVector< QString > &distanceGraphBackward, QVector< QString > &distancePercentBackward) const =0 |
Calculate geometry parameters. | |
Protected Member Functions | |
void | calculatePositionsGraph (const Points &points, const Transformation &transformation, QVector< QPointF > &positionsGraph) const |
Convert screen positions to graph positions. | |
double | functionArea (const QVector< QPointF > &positionsGraph) const |
Use trapezoidal approximation to compute area under the function. Does not apply to relation. | |
void | insertSubintervalsAndLoadDistances (int subintervalsPerInterval, const QVector< QPointF > &positionsGraph, QVector< QPointF > &positionsGraphWithSubintervals, QVector< QString > &distanceGraphForward, QVector< QString > &distancePercentForward, QVector< QString > &distanceGraphBackward, QVector< QString > &distancePercentBackward) const |
Insert the specified number of subintervals into each interval. More... | |
void | loadXY (const QVector< QPointF > &positionsGraph, const DocumentModelCoords &modelCoords, const DocumentModelGeneral &modelGeneral, const MainWindowModel &modelMainWindow, const Transformation &transformation, QVector< QString > &x, QVector< QString > &y) const |
Load x and y coordinate vectors. | |
double | polygonAreaForSimplyConnected (const QVector< QPointF > &points) const |
Area in polygon using Shoelace formula, which only works if polygon is simply connected. More... | |
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 23 of file GeometryStrategyAbstractBase.h.
|
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.
|
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 166 of file GeometryStrategyAbstractBase.cpp.