8 Oct 00:51
Geometry and spatial indexes, my opinion
From: Mathias Gaunard <mathias.gaunard <at> ens-lyon.org>
Subject: Geometry and spatial indexes, my opinion
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-10-07 22:52:12 GMT
Subject: Geometry and spatial indexes, my opinion
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-10-07 22:52:12 GMT
Hi, Wanting to code a simple 3D virtual world, I looked into the recent spatial indexes SOC work, which depends on the proposed geometry library. I have to admit I was fairly disappointed. So I'm going to put some critics, some quite harsh maybe, along with some ramblings about what I would have liked to have. Note that I am no geometry or space indexing expert, so what I say may be perfectly silly. For starters, I think those libraries should be dimension agnostic and generic. Geometry not only has a strong 2D bias, but the documentation also says geometry::box only works with point_xy (and point_ll). Since it is used everywhere in spatial index, that means it's unusable on 3D. The geometry documentation doesn't clearly state what a geometry::box is. Is it (assuming 2D) any rectangle or only axis-aligned rectangles? In case it is just any rectangle, it mind be interesting to introduce a new type for axis-aligned ones, which can always be defined from two points whatever the dimension (well, at least it seems enough for 3D, I'm not good at projecting in other dimensions to see if that'd work). I suppose the spatial index interface expects axis-aligned boxes, so it's fairly important to clarify what we're talking about. Apart from that, there is also lots of point_xy-dependent code in spatial indexes. Also the quadtree implementation isn't dimension agnostic in particular (it should have 2^n children nodes, and not 4). I don't really get why it uses shared_ptr everywhere either (is it(Continue reading)
Regards
Bruno
_______________________________________________
Unsubscribe & other changes: