Boost logo

Geometry :

Subject: [ggl] space partitioning
From: Barend Gehrels (barend.gehrels)
Date: 2010-08-23 08:54:57


hi Adam,

>>
>>> In the attachment there are:
>>> runtime_point.cpp - geometry::point concept wrapper providing runtime
>>> get(index) and set(index, value) methods used in one of the algorithms,
>>> box.cpp - geometry::box algorithms
>>> kd-tree.cpp - kd-tree implementation, there should be another tag
>>> used, indicating type of objects (in this case point_tag).

I've a small problem compiling your code.

 From the main program:
    spar::left_aabb<0>(b, 0.0f);
    spar::left_aabb(0, rb, 0.0f);

are mutually inconsistent, they (or one of them) are not compiling,
maybe the test program was based on another version.

Furthermore the code in RuntimePoint is based on constructions as
"typename Point::coordinate_type". This was OK, for a geometry::point
only, until recently (Aug 15). But it actually should be "typename
coordinate_type<Point>::type" to support also point types NOT being a
geometry::point. This was also the (one of) reason to remove that
coordinate_type from point itself, so it is not there anymore...
Therefore I personally cannot compile it (and you will get errors as
soon as you update).

This is also for two other metafunctions, so to compile it for any point
type:
1) typename Point::coordinate_type -> typename coordinate_type<Point>::type
2) typename Point::coordinate_system -> typename
coordinate_system<Point>::type
3) Point::coordinate_count-> dimension<Point>::value

Regards, Barend


Geometry list run by mateusz at loskot.net