8 #include <boost/smart_ptr.hpp> 28 namespace frechet {
namespace fs {
42 class GridAxis :
public std::vector<data::Interval>
77 double map(
double x)
const;
128 typedef boost::shared_ptr<Grid>
ptr;
static Curve mapToSequence(const Curve &C, double x1, double x2)
given a polygonal curve and two offsets, compute the sequence of line segment connecting both offsets
double map(double x) const
maps a value from [0..n] onto the axis [0..|P|]
GridAxis _vert
arc lengths of Q == vertical grid coordinates
LineStyle lineStyle(int i) const
const GridAxis & vert() const
static Point mapToPoint(const Curve &C, double x)
given a polygonal curve and an offset, compute the point on the curve
global definitions for all algorithms.
std::vector< LineStyle > LineStyleVector
LineStyle defaultLineStyle
default line style for drawing a grid line
LineStyleVector lineStyles
custom line styles for grid lines
static QLineF mapToSegment(const Curve &C, double x1, double x2)
given a polygonal curve and two offsets, compute the corresponding line segment
void setCurve(const Curve &P)
compute the length of each polygon segment
void setLineStyles(const LineStyleVector &linesStyles, LineStyle defaultLineStyle)
assign line styles for visualisation
QLineF verticalGridLine(int i)
map a vertical line
QRectF mapRect(QRectF r)
map a rectangle from [0..n]x[0..m] to the grid coordinates [0..|P|]x[0..|Q|]
QPointF Point
a point in the plane; with double floating point precision. This type is heavily used throughout all ...
a grid axis maps the segments of the input curve to an axis of the free-space diagram.
void setCurves(const Curve &P, const Curve &Q)
calculate grid from input curves
performs mappings to and from the free-space grid
QPolygonF Curve
a polygonal curve in the plane; with double floating point precision. This type is heavily used throu...
Curve mapCurve(Curve c)
map a sequence of line segments from [0..n]x[0..m] to the grid coordinates [0..|P|]x[0....
GridAxis()
empty constructor
boost::shared_ptr< Grid > ptr
smart pointer to a Grid object
Point mapPoint(Point p)
map a point from [0..n]x[0..m] to the grid coordinates [0..|P|]x[0..|Q|]
const GridAxis & hor() const
LineStyle
display style of grid lines in free-space diagram
QRectF cellBounds(int i, int j) const
GridAxis _hor
arc lengths of P == horizontal grid coordinates
QLineF horizontalGridLine(int j)
map a horizontal line
an interval of two double values.
QLineF mapLine(QLineF l)
map a line segment from [0..n]x[0..m] to the grid coordinates [0..|P|]x[0..|Q|]