I committed some further refinements to the nurbs
API, and a demo showing how to align path segments
relative to each other. Of course, I'm using *my*
definition of 'segment' here, as I try to show how
I imagine the Path API to look like.
I use functions nurbs::evaluate_at() to compute
the first and last point of a nurbs curve so I
can compute a translation vector with it.
Using that, I draw a polyline, a nurbs, another
polyline, and another nurbs such that they are
connected. That works beautifully.
As I suggested, two other 'connection styles' are
imaginable, both using absolute positioning (well,
within the current CS of course): a disconnected
(i.e. with a logical 'moveto'), and a connected
(i.e. with a logical 'lineto'). We may offer all
three by adding an enum to the segment that
specifies how to connect to the next segment.
If there is no next segment, this may just express
whether or not the path is to be closed.
Any thoughts ?
|