|
Geometry : |
Subject: [ggl] space partitioning
From: Adam Wulkiewicz (adam.wulkiewicz)
Date: 2010-08-26 09:00:29
Barend Gehrels wrote:
> 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
Sorry that I haven't responsed earlier.
Yes, I'm using the old version, thanks. But I don't know if I'll make
corrections now. It seems that dynamic self balancing spacial index is
desirable. What do you think about it?
Regards,
Adam
Geometry list run by mateusz at loskot.net