SFCGAL
Public Types | Public Member Functions | List of all members
SFCGAL::detail::GeometrySet< Dim > Class Template Reference

A GeometrySet represents a set of CGAL primitives. More...

#include <GeometrySet.h>

Public Types

typedef std::set< CollectionElement< typename Point_d< Dim >::Type > > PointCollection
 
typedef std::set< CollectionElement< typename Segment_d< Dim >::Type > > SegmentCollection
 
typedef std::list< CollectionElement< typename Surface_d< Dim >::Type > > SurfaceCollection
 
typedef std::list< CollectionElement< typename Volume_d< Dim >::Type > > VolumeCollection
 

Public Member Functions

 GeometrySet ()
 
 GeometrySet (const Geometry &g)
 Construct a GeometrySet from a SFCGAL::Geometry. More...
 
 GeometrySet (const typename TypeForDimension< Dim >::Point &g, int flags=0)
 Construct a GeometrySet from a Point. More...
 
 GeometrySet (const typename TypeForDimension< Dim >::Segment &g, int flags=0)
 Construct a GeometrySet from a Segment. More...
 
 GeometrySet (const typename TypeForDimension< Dim >::Surface &g, int flags=0)
 Construct a GeometrySet from a Surface. More...
 
 GeometrySet (const typename TypeForDimension< Dim >::Volume &g, int flags=0)
 Construct a GeometrySet from a Volume. More...
 
void merge (const GeometrySet< Dim > &g)
 Add primitives from another set. More...
 
void addGeometry (const Geometry &g)
 Add a geometry by decomposing it into CGAL primitives. More...
 
void addPrimitive (const PrimitiveHandle< Dim > &p)
 add a primitive from a PrimitiveHandle to the set More...
 
void addPrimitive (const CGAL::Object &o, bool pointsAsRing=false)
 add a primitive from a CGAL::Object to the set pointsAsRing : if set to true, build a polygon if o is a vector of points More...
 
void addPrimitive (const typename TypeForDimension< Dim >::Point &g, int flags=0)
 add a point to the set More...
 
template<class IT >
void addPoints (IT ibegin, IT iend)
 
void collectPoints (const PrimitiveHandle< Dim > &b)
 collect all points of b and add them to the point list More...
 
void addPrimitive (const typename TypeForDimension< Dim >::Segment &g, int flags=0)
 add a segment to the set More...
 
template<class IT >
void addSegments (IT ibegin, IT iend)
 
void addPrimitive (const typename TypeForDimension< Dim >::Surface &g, int flags=0)
 add a surface to the set More...
 
template<class IT >
void addSurfaces (IT ibegin, IT iend)
 
void addPrimitive (const typename TypeForDimension< Dim >::Volume &g, int flags=0)
 add a volume to the set More...
 
template<class IT >
void addVolumes (IT ibegin, IT iend)
 
int dimension () const
 Get the maximum geometry dimension of the set -1 : empty 0 : there are points 1 : there are segments 2 : there are surfaces 3 : there are volumes. More...
 
void addBoundary (const typename TypeForDimension< Dim >::Surface &surface)
 Add the boundary (segments) of a surface. More...
 
void addBoundary (const typename TypeForDimension< Dim >::Volume &volume)
 Add the boundary (surfaces) of a volume. More...
 
void computeBoundingBoxes (typename HandleCollection< Dim >::Type &handles, typename BoxCollection< Dim >::Type &boxes) const
 Compute all bounding boxes and handles of the set. More...
 
PointCollectionpoints ()
 
const PointCollectionpoints () const
 
SegmentCollectionsegments ()
 
const SegmentCollectionsegments () const
 
SurfaceCollectionsurfaces ()
 
const SurfaceCollectionsurfaces () const
 
VolumeCollectionvolumes ()
 
const VolumeCollectionvolumes () const
 
bool hasPoints () const
 Returns true if the set holds points. More...
 
bool hasSegments () const
 Returns true if the set holds segments. More...
 
bool hasSurfaces () const
 Returns true if the set holds surfaces. More...
 
bool hasVolumes () const
 Returns true if the set holds volumes. More...
 
std::unique_ptr< Geometryrecompose () const
 convert the set to a SFCGAL::Geometry More...
 
void filterCovered (GeometrySet< Dim > &output) const
 Filter (remove) primitives that are already covered by others. More...
 
void addPrimitive (const PrimitiveHandle< 2 > &p)
 
void addPrimitive (const PrimitiveHandle< 3 > &p)
 
void addPrimitive (const CGAL::Object &o, bool pointsAsRing)
 
void addPrimitive (const CGAL::Object &o, bool pointsAsRing)
 
void addPrimitive (const TypeForDimension< 2 >::Surface &p, int flags)
 
void addPrimitive (const TypeForDimension< 3 >::Surface &p, int flags)
 
void addPrimitive (const TypeForDimension< 2 >::Volume &, int)
 
void addPrimitive (const TypeForDimension< 3 >::Volume &p, int flags)
 
auto hasSurfaces () const -> bool
 
auto hasSurfaces () const -> bool
 
auto hasVolumes () const -> bool
 
auto hasVolumes () const -> bool
 
void addBoundary (const TypeForDimension< 2 >::Surface &surface)
 
void addBoundary (const TypeForDimension< 3 >::Surface &)
 
auto dimension () const -> int
 
auto dimension () const -> int
 

Detailed Description

template<int Dim>
class SFCGAL::detail::GeometrySet< Dim >

A GeometrySet represents a set of CGAL primitives.

Primitive are either of dimension 0 (points), dimension 1 (segments), dimension 2 (surfaces, a.k.a. polygon or triangles) or dimension 3 (polyhedron)

Member Typedef Documentation

◆ PointCollection

template<int Dim>
typedef std::set<CollectionElement<typename Point_d<Dim>::Type> > SFCGAL::detail::GeometrySet< Dim >::PointCollection

◆ SegmentCollection

template<int Dim>
typedef std::set<CollectionElement<typename Segment_d<Dim>::Type> > SFCGAL::detail::GeometrySet< Dim >::SegmentCollection

◆ SurfaceCollection

template<int Dim>
typedef std::list<CollectionElement<typename Surface_d<Dim>::Type> > SFCGAL::detail::GeometrySet< Dim >::SurfaceCollection

◆ VolumeCollection

template<int Dim>
typedef std::list<CollectionElement<typename Volume_d<Dim>::Type> > SFCGAL::detail::GeometrySet< Dim >::VolumeCollection

Constructor & Destructor Documentation

◆ GeometrySet() [1/6]

template<int Dim>
SFCGAL::detail::GeometrySet< Dim >::GeometrySet ( )
default

◆ GeometrySet() [2/6]

template<int Dim>
SFCGAL::detail::GeometrySet< Dim >::GeometrySet ( const Geometry g)

Construct a GeometrySet from a SFCGAL::Geometry.

◆ GeometrySet() [3/6]

template<int Dim>
SFCGAL::detail::GeometrySet< Dim >::GeometrySet ( const typename TypeForDimension< Dim >::Point &  g,
int  flags = 0 
)

Construct a GeometrySet from a Point.

◆ GeometrySet() [4/6]

template<int Dim>
SFCGAL::detail::GeometrySet< Dim >::GeometrySet ( const typename TypeForDimension< Dim >::Segment &  g,
int  flags = 0 
)

Construct a GeometrySet from a Segment.

◆ GeometrySet() [5/6]

template<int Dim>
SFCGAL::detail::GeometrySet< Dim >::GeometrySet ( const typename TypeForDimension< Dim >::Surface &  g,
int  flags = 0 
)

Construct a GeometrySet from a Surface.

◆ GeometrySet() [6/6]

template<int Dim>
SFCGAL::detail::GeometrySet< Dim >::GeometrySet ( const typename TypeForDimension< Dim >::Volume &  g,
int  flags = 0 
)

Construct a GeometrySet from a Volume.

Member Function Documentation

◆ addBoundary() [1/4]

void SFCGAL::detail::GeometrySet< 2 >::addBoundary ( const TypeForDimension< 2 >::Surface &  surface)

◆ addBoundary() [2/4]

void SFCGAL::detail::GeometrySet< 3 >::addBoundary ( const TypeForDimension< 3 >::Surface &  )

◆ addBoundary() [3/4]

template<int Dim>
void SFCGAL::detail::GeometrySet< Dim >::addBoundary ( const typename TypeForDimension< Dim >::Surface &  surface)

Add the boundary (segments) of a surface.

◆ addBoundary() [4/4]

template<int Dim>
void SFCGAL::detail::GeometrySet< Dim >::addBoundary ( const typename TypeForDimension< Dim >::Volume &  volume)

Add the boundary (surfaces) of a volume.

◆ addGeometry()

template<int Dim>
void SFCGAL::detail::GeometrySet< Dim >::addGeometry ( const Geometry g)

Add a geometry by decomposing it into CGAL primitives.

◆ addPoints()

template<int Dim>
template<class IT >
void SFCGAL::detail::GeometrySet< Dim >::addPoints ( IT  ibegin,
IT  iend 
)
inline

◆ addPrimitive() [1/14]

void SFCGAL::detail::GeometrySet< 3 >::addPrimitive ( const CGAL::Object &  o,
bool  pointsAsRing 
)

◆ addPrimitive() [2/14]

void SFCGAL::detail::GeometrySet< 2 >::addPrimitive ( const CGAL::Object &  o,
bool  pointsAsRing 
)

◆ addPrimitive() [3/14]

template<int Dim>
void SFCGAL::detail::GeometrySet< Dim >::addPrimitive ( const CGAL::Object &  o,
bool  pointsAsRing = false 
)

add a primitive from a CGAL::Object to the set pointsAsRing : if set to true, build a polygon if o is a vector of points

◆ addPrimitive() [4/14]

void SFCGAL::detail::GeometrySet< 2 >::addPrimitive ( const PrimitiveHandle< 2 > &  p)

◆ addPrimitive() [5/14]

void SFCGAL::detail::GeometrySet< 3 >::addPrimitive ( const PrimitiveHandle< 3 > &  p)

◆ addPrimitive() [6/14]

template<int Dim>
void SFCGAL::detail::GeometrySet< Dim >::addPrimitive ( const PrimitiveHandle< Dim > &  p)

add a primitive from a PrimitiveHandle to the set

◆ addPrimitive() [7/14]

void SFCGAL::detail::GeometrySet< 2 >::addPrimitive ( const TypeForDimension< 2 >::Surface &  p,
int  flags 
)

◆ addPrimitive() [8/14]

void SFCGAL::detail::GeometrySet< 2 >::addPrimitive ( const TypeForDimension< 2 >::Volume &  ,
int   
)

◆ addPrimitive() [9/14]

void SFCGAL::detail::GeometrySet< 3 >::addPrimitive ( const TypeForDimension< 3 >::Surface &  p,
int  flags 
)

◆ addPrimitive() [10/14]

void SFCGAL::detail::GeometrySet< 3 >::addPrimitive ( const TypeForDimension< 3 >::Volume &  p,
int  flags 
)

◆ addPrimitive() [11/14]

template<int Dim>
void SFCGAL::detail::GeometrySet< Dim >::addPrimitive ( const typename TypeForDimension< Dim >::Point &  g,
int  flags = 0 
)

add a point to the set

◆ addPrimitive() [12/14]

template<int Dim>
void SFCGAL::detail::GeometrySet< Dim >::addPrimitive ( const typename TypeForDimension< Dim >::Segment &  g,
int  flags = 0 
)

add a segment to the set

◆ addPrimitive() [13/14]

template<int Dim>
void SFCGAL::detail::GeometrySet< Dim >::addPrimitive ( const typename TypeForDimension< Dim >::Surface &  g,
int  flags = 0 
)

add a surface to the set

◆ addPrimitive() [14/14]

template<int Dim>
void SFCGAL::detail::GeometrySet< Dim >::addPrimitive ( const typename TypeForDimension< Dim >::Volume &  g,
int  flags = 0 
)

add a volume to the set

◆ addSegments()

template<int Dim>
template<class IT >
void SFCGAL::detail::GeometrySet< Dim >::addSegments ( IT  ibegin,
IT  iend 
)
inline

◆ addSurfaces()

template<int Dim>
template<class IT >
void SFCGAL::detail::GeometrySet< Dim >::addSurfaces ( IT  ibegin,
IT  iend 
)
inline

◆ addVolumes()

template<int Dim>
template<class IT >
void SFCGAL::detail::GeometrySet< Dim >::addVolumes ( IT  ibegin,
IT  iend 
)
inline

◆ collectPoints()

template<int Dim>
void SFCGAL::detail::GeometrySet< Dim >::collectPoints ( const PrimitiveHandle< Dim > &  b)

collect all points of b and add them to the point list

◆ computeBoundingBoxes()

template<int Dim>
void SFCGAL::detail::GeometrySet< Dim >::computeBoundingBoxes ( typename HandleCollection< Dim >::Type &  handles,
typename BoxCollection< Dim >::Type &  boxes 
) const

Compute all bounding boxes and handles of the set.

◆ dimension() [1/3]

template<int Dim>
int SFCGAL::detail::GeometrySet< Dim >::dimension ( ) const

Get the maximum geometry dimension of the set -1 : empty 0 : there are points 1 : there are segments 2 : there are surfaces 3 : there are volumes.

◆ dimension() [2/3]

auto SFCGAL::detail::GeometrySet< 2 >::dimension ( ) const -> int

◆ dimension() [3/3]

auto SFCGAL::detail::GeometrySet< 3 >::dimension ( ) const -> int

◆ filterCovered()

template<int Dim>
void SFCGAL::detail::GeometrySet< Dim >::filterCovered ( GeometrySet< Dim > &  output) const

Filter (remove) primitives that are already covered by others.

◆ hasPoints()

template<int Dim>
auto SFCGAL::detail::GeometrySet< Dim >::hasPoints

Returns true if the set holds points.

◆ hasSegments()

template<int Dim>
auto SFCGAL::detail::GeometrySet< Dim >::hasSegments

Returns true if the set holds segments.

◆ hasSurfaces() [1/3]

template<int Dim>
bool SFCGAL::detail::GeometrySet< Dim >::hasSurfaces ( ) const

Returns true if the set holds surfaces.

◆ hasSurfaces() [2/3]

auto SFCGAL::detail::GeometrySet< 2 >::hasSurfaces ( ) const -> bool

◆ hasSurfaces() [3/3]

auto SFCGAL::detail::GeometrySet< 3 >::hasSurfaces ( ) const -> bool

◆ hasVolumes() [1/3]

template<int Dim>
bool SFCGAL::detail::GeometrySet< Dim >::hasVolumes ( ) const

Returns true if the set holds volumes.

◆ hasVolumes() [2/3]

auto SFCGAL::detail::GeometrySet< 2 >::hasVolumes ( ) const -> bool

◆ hasVolumes() [3/3]

auto SFCGAL::detail::GeometrySet< 3 >::hasVolumes ( ) const -> bool

◆ merge()

template<int Dim>
void SFCGAL::detail::GeometrySet< Dim >::merge ( const GeometrySet< Dim > &  g)

Add primitives from another set.

◆ points() [1/2]

template<int Dim>
PointCollection & SFCGAL::detail::GeometrySet< Dim >::points ( )
inline

◆ points() [2/2]

template<int Dim>
const PointCollection & SFCGAL::detail::GeometrySet< Dim >::points ( ) const
inline

◆ recompose()

template<int Dim>
auto SFCGAL::detail::GeometrySet< Dim >::recompose

convert the set to a SFCGAL::Geometry

◆ segments() [1/2]

template<int Dim>
SegmentCollection & SFCGAL::detail::GeometrySet< Dim >::segments ( )
inline

◆ segments() [2/2]

template<int Dim>
const SegmentCollection & SFCGAL::detail::GeometrySet< Dim >::segments ( ) const
inline

◆ surfaces() [1/2]

template<int Dim>
SurfaceCollection & SFCGAL::detail::GeometrySet< Dim >::surfaces ( )
inline

◆ surfaces() [2/2]

template<int Dim>
const SurfaceCollection & SFCGAL::detail::GeometrySet< Dim >::surfaces ( ) const
inline

◆ volumes() [1/2]

template<int Dim>
VolumeCollection & SFCGAL::detail::GeometrySet< Dim >::volumes ( )
inline

◆ volumes() [2/2]

template<int Dim>
const VolumeCollection & SFCGAL::detail::GeometrySet< Dim >::volumes ( ) const
inline