
correct, axis-aligned rectangles and boxes can be thought of as multi-dimensional ranges this implies that area (or whatever) could be defined as: struct area { point low; point high; point &operator[](size_t i) { return (&low)[i]; } // contentious, i know // things you'd expect from a range bool contains(const point &p) { return !strict_less(p, low) && strict_less(p, high); } }; note that area could be templated with the point type, since it would work just as well for float, point3d, etc. /tox "Michael Walter" <michael.walter@gmail.com> wrote in message news:877e9a1704121705302ac4bce4@mail.gmail.com...
On Fri, 17 Dec 2004 13:06 +0000 (GMT), Dave Harris <brangdon@cix.compulink.co.uk> wrote:
[...] So conceptually we need two rectangle types. I suggest "rectangle" is reserved for the general case, and the aligned one is called "box". As in "bounding box". It has the benefit of being short. Not sure. In computer graphics you specifically talk about "axis-aligned bounding boxes". To me, "box" is the 3d version of "rectangle".
Cheers, Michael _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost