コード例 #1
0
ファイル: geomap.cpp プロジェクト: weimingtom/master-game
VisiLibity::Polygon ConvertPolygonCGAL2Vis(Polygon_2 pgn)
{
    VisiLibity::Polygon cPoly;
    Polygon_2::Vertex_iterator cv ;
    for (cv=pgn.vertices_begin();cv!=pgn.vertices_end();++cv)
          {
              cPoly.push_back(VisiLibity::Point(cv->x(),cv->y()));
          };
    return cPoly;

}
コード例 #2
0
ファイル: vorotree.cpp プロジェクト: gunyarakun/nicotagmap
 std::ostream& print_ostream(std::ostream &os) const {
   if (name) {
     os << "name: " << name << " ";
   } else {
     os << "name: anonymous ";
   }
   os << "p: (" << CGAL::to_double(p.x()) << ", " << CGAL::to_double(p.y()) << ") ";
   os << "adesired: " << adesired << " ";
   os << "area: " << CGAL::to_double(region.area()) << " ";
   os << "childrens: " << children.size() << " ";
   os << "region:";
   Polygon_2::Vertex_iterator pit;
   for (pit = region.vertices_begin();
        pit != region.vertices_end();
        ++pit) {
     os << " (" << CGAL::to_double(pit->x()) << ", " << CGAL::to_double(pit->y()) << ")";
   }
   return os;
 }