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

Boost.Geometry for_each_point

C++

for_each_point()は、図形に含まれる全ての点に対して操作を行うためのアルゴリズムです。 図形をmutableに操作したい場合などに、transformの代わりに使えるのではないかと思います。 以下は、三角形を平行移動する例: #include <iostream> #include <boost/geometry.hpp> #include <boost/geometry/geometries/point_xy.hpp> #inc</boost/geometry/geometries/point_xy.hpp></boost/geometry.hpp></iostream>…