2011-08-08から1日間の記事一覧

Boost.Geometry lengthとperimeter

C++

length()は、図形に含まれる連続した点の、距離の和を計算するアルゴリズムです。 Boost 1.47.0時点では、linestring以外は0が返されるようです。 #include <iostream> #include <boost/geometry.hpp> #include <boost/geometry/geometries/point_xy.hpp> #include <boost/geometry/geometries/linestring.hpp> #include <boost/assign/list_of.hpp> namespace bg = boost::geome…</boost/assign/list_of.hpp></boost/geometry/geometries/linestring.hpp></boost/geometry/geometries/point_xy.hpp></boost/geometry.hpp></iostream>