R
Rune Allnor
Hi all.
I am working on an application to process geometric (x,y,z) data
measured in a physical world. The application relies heavily on
the user interacting with the data through a GUI.
In particular, both the 'world data' and the 'screen data' require
much the same types of operations:
- Select bounding polygons.
- Preprocess / regularize the polygons.
- Identify whether data points are enclosed or not, by the polygon.
The algorithms in both cases are the same. The semantics differ.
For instance, my xyzpoint<T> class addresses the x coordinate
of the individual point p as
xyzpoint<float> p;
float x = p.x();
whereas the Qt GUI library addresses the x coordinate of a point
on the screen as something like
QGraphicsItem *item = new SomeGraphicsItem;
item->pos().x();
So I would save a lot of duplicate work if I could somehow introduce
the exact semantics of addressing the individual coordinates of the
data points as variables.
Could lambda expressions be used for this?
Or are there other ways to achieve the same end?
Rune
I am working on an application to process geometric (x,y,z) data
measured in a physical world. The application relies heavily on
the user interacting with the data through a GUI.
In particular, both the 'world data' and the 'screen data' require
much the same types of operations:
- Select bounding polygons.
- Preprocess / regularize the polygons.
- Identify whether data points are enclosed or not, by the polygon.
The algorithms in both cases are the same. The semantics differ.
For instance, my xyzpoint<T> class addresses the x coordinate
of the individual point p as
xyzpoint<float> p;
float x = p.x();
whereas the Qt GUI library addresses the x coordinate of a point
on the screen as something like
QGraphicsItem *item = new SomeGraphicsItem;
item->pos().x();
So I would save a lot of duplicate work if I could somehow introduce
the exact semantics of addressing the individual coordinates of the
data points as variables.
Could lambda expressions be used for this?
Or are there other ways to achieve the same end?
Rune