Exemplo n.º 1
0
void ForceValidityVisitor::visit( MultiPolygon& g )
{
    g.forceValidityFlag( valid_ );
    for ( size_t i = 0; i < g.numGeometries(); i++ ) {
        visit( g.polygonN( i ) );
    }
}
Exemplo n.º 2
0
std::auto_ptr< MultiLineString > straightSkeleton( const MultiPolygon& g )
{
	std::auto_ptr< MultiLineString > result( new MultiLineString );
	for ( size_t i = 0; i < g.numGeometries(); i++ ){
		Polygon_with_holes_2 polygon = g.polygonN(i).toPolygon_with_holes_2() ;
		boost::shared_ptr< Straight_skeleton_2 > skeleton = CGAL::create_interior_straight_skeleton_2( polygon ) ;
		straightSkeletonToMultiLineString( *skeleton, *result ) ;
	}
	return result ;
}
Exemplo n.º 3
0
void BoundaryVisitor::visit( const MultiPolygon& g )
{
    graph::GeometryGraph        graph ;
    graph::GeometryGraphBuilder graphBuilder( graph ) ;

    for ( size_t i = 0; i < g.numGeometries(); i++ ) {
        graphBuilder.addPolygon( g.polygonN( i ) );
    }

    getBoundaryFromPolygons( graph ) ;
}
Exemplo n.º 4
0
std::auto_ptr< Geometry > building(
    const MultiPolygon& g,
    const Kernel::FT& wallHeight,
    const Kernel::FT& roofSlope
)
{
    std::auto_ptr< MultiSolid > multiSolid( new MultiSolid );

    for ( size_t i = 0; i < g.numGeometries(); i++ ) {
        multiSolid->addGeometry( building( g.polygonN( i ), wallHeight, roofSlope ).release() );
    }

    return std::auto_ptr< Geometry >( multiSolid.release() );
}
Exemplo n.º 5
0
void GetPointsVisitor::visit( const MultiPolygon& g )
{
    for ( size_t i = 0; i < g.numGeometries(); i++ ) {
        visit( g.polygonN( i ) );
    }
}