Boost logo

Geometry :

Subject: Re: [geometry] using own Polygon model
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2013-08-30 05:09:35


On 30 August 2013 10:00, Hunk <heiko.hoennige_at_[hidden]> wrote:
> Hello,
>
> i have defined a polygon:
>
> [Code]
>
> std::vector<PointTyp> polygon
>
> class PointTyp{
> Eigen::Vector2d point
> double parameter...
> }
>
> [/Code]
>
> is it possible to use boost methods like intersection or calculate area?

Quick response,

http://www.boost.org/doc/libs/1_54_0/libs/geometry/doc/html/geometry/reference/adapted/register/boost_geometry_register_point_2d.html
http://www.boost.org/doc/libs/1_54_0/libs/geometry/doc/html/geometry/reference/adapted/register/boost_geometry_register_ring.html

there is also example for legacy types, not necessary in your case,
but might be helpful to get the picture:
http://www.boost.org/doc/libs/1_54_0/libs/geometry/doc/html/geometry/examples.html

Best regards,

-- 
Mateusz  Loskot, http://mateusz.loskot.net
"Participation in this whole process is a form of torture" ~~ Szalony

Geometry list run by mateusz at loskot.net