SFCGAL 2.0.0
SFCGAL::graph::GeometryGraphBuilderT< Graph > Class Template Reference

[private]Convert Geometries to a GeometryGraph. More...

#include <GeometryGraphBuilder.h>

Public Types

typedef Graph graph_t
 
typedef graph_t::vertex_properties vertex_properties
 
typedef graph_t::edge_properties edge_properties
 
typedef graph_t::vertex_descriptor vertex_descriptor
 
typedef graph_t::edge_descriptor edge_descriptor
 
typedef std::map< Coordinate, vertex_descriptorcoordinate_list
 allows to match duplicates
 

Public Member Functions

 GeometryGraphBuilderT (graph_t &graph)
 default constructor
 
 ~GeometryGraphBuilderT ()
 destructor
 
vertex_descriptor addPoint (const Point &point)
 add a Point to the Graph
 
edge_descriptor addLineSegment (const Point &a, const Point &b, const edge_properties &edgeProperties=edge_properties())
 add a Point to the Graph
 
std::vector< edge_descriptoraddLineString (const LineString &lineString, const edge_properties &edgeProperties=edge_properties())
 add a LineString to the graph
 
std::vector< edge_descriptoraddTriangle (const Triangle &triangle, const edge_properties &edgeProperties=edge_properties())
 add a Triangle to the graph
 
std::vector< std::vector< edge_descriptor > > addPolygon (const Polygon &polygon, const edge_properties &edgeProperties=edge_properties())
 add a Polygon to the graph
 
std::vector< std::vector< edge_descriptor > > addTriangulatedSurface (const TriangulatedSurface &triangulatedSurface, const edge_properties &edgeProperties=edge_properties())
 add a TriangulatedSurface to the graph
 
std::vector< std::vector< std::vector< edge_descriptor > > > addPolyhedralSurface (const PolyhedralSurface &polyhedralSurface, const edge_properties &edgeProperties=edge_properties())
 add a PolyhedralSurface to the graph
 

Detailed Description

template<typename Graph>
class SFCGAL::graph::GeometryGraphBuilderT< Graph >

[private]Convert Geometries to a GeometryGraph.

Identifier in the Graph are returned in order to allow the user to keep identify the geometry.

Todo
wrap vertex_descriptor, std::vector< edge_descriptor >, etc. in SharedPoint, SharedLineString, SharedPolygon, etc. and add utility method on the Graph?

Member Typedef Documentation

◆ coordinate_list

template<typename Graph>
typedef std::map<Coordinate, vertex_descriptor> SFCGAL::graph::GeometryGraphBuilderT< Graph >::coordinate_list

allows to match duplicates

◆ edge_descriptor

template<typename Graph>
typedef graph_t::edge_descriptor SFCGAL::graph::GeometryGraphBuilderT< Graph >::edge_descriptor

◆ edge_properties

template<typename Graph>
typedef graph_t::edge_properties SFCGAL::graph::GeometryGraphBuilderT< Graph >::edge_properties

◆ graph_t

template<typename Graph>
typedef Graph SFCGAL::graph::GeometryGraphBuilderT< Graph >::graph_t

◆ vertex_descriptor

template<typename Graph>
typedef graph_t::vertex_descriptor SFCGAL::graph::GeometryGraphBuilderT< Graph >::vertex_descriptor

◆ vertex_properties

template<typename Graph>
typedef graph_t::vertex_properties SFCGAL::graph::GeometryGraphBuilderT< Graph >::vertex_properties

Constructor & Destructor Documentation

◆ GeometryGraphBuilderT()

template<typename Graph>
SFCGAL::graph::GeometryGraphBuilderT< Graph >::GeometryGraphBuilderT ( graph_t & graph)
inline

default constructor

◆ ~GeometryGraphBuilderT()

template<typename Graph>
SFCGAL::graph::GeometryGraphBuilderT< Graph >::~GeometryGraphBuilderT ( )
inline

destructor

Member Function Documentation

◆ addLineSegment()

template<typename Graph>
edge_descriptor SFCGAL::graph::GeometryGraphBuilderT< Graph >::addLineSegment ( const Point & a,
const Point & b,
const edge_properties & edgeProperties = edge_properties() )
inline

add a Point to the Graph

Returns
the edge inserted into the graph

◆ addLineString()

template<typename Graph>
std::vector< edge_descriptor > SFCGAL::graph::GeometryGraphBuilderT< Graph >::addLineString ( const LineString & lineString,
const edge_properties & edgeProperties = edge_properties() )
inline

add a LineString to the graph

Returns
the list of edges inserted into the graph

◆ addPoint()

template<typename Graph>
vertex_descriptor SFCGAL::graph::GeometryGraphBuilderT< Graph >::addPoint ( const Point & point)
inline

add a Point to the Graph

◆ addPolygon()

template<typename Graph>
std::vector< std::vector< edge_descriptor > > SFCGAL::graph::GeometryGraphBuilderT< Graph >::addPolygon ( const Polygon & polygon,
const edge_properties & edgeProperties = edge_properties() )
inline

add a Polygon to the graph

Returns
the list of rings inserted into the graph

◆ addPolyhedralSurface()

template<typename Graph>
std::vector< std::vector< std::vector< edge_descriptor > > > SFCGAL::graph::GeometryGraphBuilderT< Graph >::addPolyhedralSurface ( const PolyhedralSurface & polyhedralSurface,
const edge_properties & edgeProperties = edge_properties() )
inline

add a PolyhedralSurface to the graph

Returns
the list of rings inserted into the graph

◆ addTriangle()

template<typename Graph>
std::vector< edge_descriptor > SFCGAL::graph::GeometryGraphBuilderT< Graph >::addTriangle ( const Triangle & triangle,
const edge_properties & edgeProperties = edge_properties() )
inline

add a Triangle to the graph

Returns
the list of edges inserted into the graph

◆ addTriangulatedSurface()

template<typename Graph>
std::vector< std::vector< edge_descriptor > > SFCGAL::graph::GeometryGraphBuilderT< Graph >::addTriangulatedSurface ( const TriangulatedSurface & triangulatedSurface,
const edge_properties & edgeProperties = edge_properties() )
inline

add a TriangulatedSurface to the graph

Returns
the list of rings inserted into the graph