Boost logo

Geometry :

Subject: [ggl] box_range is not a valid range
From: Barend Gehrels (barend)
Date: 2011-05-08 00:17:18

On 3-5-2011 3:37, zzsj wrote:
> hi,Barend
>> Did you work out your suggestion in your solution? If so, could you send
>> it such that we might replace it?
> That's fairly easy. Almost just copy and paste code of box_rang/box_iterator. I've also removed some unnecessary test since it seems iterator is always compared with other iterator of same range.

Thanks again for this - I decided to adopt it, and then processed it a
bit and merged the implementation (now in views/detail/points_view) with
segment_range because they were so similar. And then renamed them to
views, because that was the general idea but not yet done for this. The
iterators are now private for the ranges, it is not the idea to publish
them separately as ranges will fullfil the needs (and can be iterated).
I had to put one thing back for the unit-test, the end-iterator need to
get a pointer to the points as well, to be able to go to end()-1 (think
this is not a common use-case but std::vector works like that, and it
worked like that before).

So views/box_view.hpp and views/segment_view contain the refactored
implementations. Additionally the box_view can now also be defined
counterclockwise (to be specified with an optional template parameter)

If you want you can send me your name to add as a contributor

Regards, Barend

Geometry list run by mateusz at