$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] [geometry] intersects bug?
From: Akira Takahashi (faithandbrave_at_[hidden])
Date: 2011-07-26 21:17:05
Hi,
I try boost::geometry::intersects algorithm(1 arg version) in Boost 1.47.0.
Follow program result is "false". but, I hope result is "true".
Is this Boost.Geometry bug?
#include <iostream>
#include <boost/assign/list_of.hpp>
#include <boost/geometry/geometry.hpp>
namespace bg = boost::geometry;
int main()
{
    typedef bg::model::d2::point_xy<double> point;
    const bg::model::linestring<point> line = boost::assign::list_of<point>
//          (0, 0) // result become "true" when comment-in
            (0, 4)
            (4, 4)
            (2, 2)
            (2, 5)
            ;
    const bool result = bg::intersects(line);
    std::cout << std::boolalpha << result << std::endl;
}
Regards,
>>========================
Akira Takahashi
mailto:faithandbrave_at_[hidden]
blog: http://d.hatena.ne.jp/faith_and_brave/