本文整理汇总了C++中tree_t::query_end方法的典型用法代码示例。如果您正苦于以下问题:C++ tree_t::query_end方法的具体用法?C++ tree_t::query_end怎么用?C++ tree_t::query_end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tree_t
的用法示例。
在下文中一共展示了tree_t::query_end方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: has_placement
bool has_placement(box2d<double> const& box, double minimum_distance, mapnik::value_unicode_string const& text, double repeat_distance)
{
box2d<double> const& minimum_box = (minimum_distance > 0
? box2d<double>(box.minx() - minimum_distance, box.miny() - minimum_distance,
box.maxx() + minimum_distance, box.maxy() + minimum_distance)
: box);
box2d<double> const& repeat_box = (repeat_distance > 0
? box2d<double>(box.minx() - repeat_distance, box.miny() - repeat_distance,
box.maxx() + repeat_distance, box.maxy() + repeat_distance)
: box);
tree_t::query_iterator itr = tree_.query_in_box(repeat_distance > minimum_distance ? repeat_box : minimum_box);
tree_t::query_iterator end = tree_.query_end();
for ( ;itr != end; ++itr)
{
if (itr->box.intersects(minimum_box) || (text == itr->text && itr->box.intersects(repeat_box)))
{
return false;
}
}
return true;
}
示例2: has_placement
bool has_placement(box2d<double> const& box, double margin, mapnik::value_unicode_string const& text, double repeat_distance)
{
// Don't bother with any of the repeat checking unless the repeat distance is greater than the margin
if (repeat_distance <= margin) {
return has_placement(box, margin);
}
box2d<double> repeat_box(box.minx() - repeat_distance, box.miny() - repeat_distance,
box.maxx() + repeat_distance, box.maxy() + repeat_distance);
box2d<double> const& margin_box = (margin > 0
? box2d<double>(box.minx() - margin, box.miny() - margin,
box.maxx() + margin, box.maxy() + margin)
: box);
tree_t::query_iterator tree_itr = tree_.query_in_box(repeat_box);
tree_t::query_iterator tree_end = tree_.query_end();
for ( ;tree_itr != tree_end; ++tree_itr)
{
if (tree_itr->get().box.intersects(margin_box) || (text == tree_itr->get().text && tree_itr->get().box.intersects(repeat_box)))
{
return false;
}
}
return true;
}
示例3: has_placement
bool has_placement(Envelope<double> const& box)
{
tree_t::query_iterator itr = tree_.query_in_box(box);
tree_t::query_iterator end = tree_.query_end();
for ( ;itr != end; ++itr)
{
if (itr->intersects(box))
{
return false;
}
}
return true;
}
示例4: has_point_placement
bool has_point_placement(box2d<double> const& box, double distance)
{
box2d<double> bigger_box(box.minx() - distance, box.miny() - distance, box.maxx() + distance, box.maxy() + distance);
tree_t::query_iterator itr = tree_.query_in_box(bigger_box);
tree_t::query_iterator end = tree_.query_end();
for ( ;itr != end; ++itr)
{
if (itr->box.intersects(bigger_box))
{
return false;
}
}
return true;
}
示例5: has_placement
bool has_placement(box2d<double> const& box, mapnik::value_unicode_string const& text, double distance)
{
box2d<double> bigger_box(box.minx() - distance, box.miny() - distance, box.maxx() + distance, box.maxy() + distance);
tree_t::query_iterator itr = tree_.query_in_box(bigger_box);
tree_t::query_iterator end = tree_.query_end();
for ( ;itr != end; ++itr)
{
if (itr->box.intersects(box) || (text == itr->text && itr->box.intersects(bigger_box)))
{
return false;
}
}
return true;
}
示例6: end
query_iterator end() { return tree_.query_end(); }