|
SFCGAL
2.3.0
|
A GeometrySet represents a set of CGAL primitives. More...
#include <GeometrySet.h>
Public Types | |
| using | PointCollection = std::set< CollectionElement< typename Point_d< Dim >::Type >> |
| Ordered set of point elements (dimension 0 primitives) More... | |
| using | SegmentCollection = std::set< CollectionElement< typename Segment_d< Dim >::Type >> |
| Ordered set of segment elements (dimension 1 primitives) More... | |
| using | SurfaceCollection = std::list< CollectionElement< typename Surface_d< Dim >::Type >> |
| List of surface elements (dimension 2 primitives) More... | |
| using | VolumeCollection = std::list< CollectionElement< typename Volume_d< Dim >::Type >> |
| List of volume elements (dimension 3 primitives) More... | |
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... | |
| auto | merge (const GeometrySet< Dim > &g) -> void |
| 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 > &handle) |
| add a primitive from a PrimitiveHandle to the set More... | |
| void | addPrimitive (const CGAL::Object &obj, bool pointsAsRing=false) |
| add a primitive from a CGAL::Object to the set pointsAsRing : if set to true, build a polygon if obj is a vector of points More... | |
| void | addPrimitive (const typename TypeForDimension< Dim >::Point &point, int flags=0) |
| add a point to the set More... | |
| template<class IT > | |
| void | addPoints (IT ibegin, IT iend) |
| Add multiple points from iterator range. More... | |
| 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 &segment, int flags=0) |
| add a segment to the set More... | |
| template<class IT > | |
| void | addSegments (IT ibegin, IT iend) |
| Add multiple segments from iterator range. More... | |
| 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) |
| Add multiple surfaces from iterator range. More... | |
| 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) |
| Add multiple volumes from iterator range. More... | |
| auto | dimension () const -> int |
| 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... | |
| auto | points () -> PointCollection & |
| Get mutable reference to point collection. More... | |
| auto | points () const -> const PointCollection & |
| Get const reference to point collection. More... | |
| auto | segments () -> SegmentCollection & |
| Get mutable reference to segment collection. More... | |
| auto | segments () const -> const SegmentCollection & |
| Get const reference to segment collection. More... | |
| auto | surfaces () -> SurfaceCollection & |
| Get mutable reference to surface collection. More... | |
| auto | surfaces () const -> const SurfaceCollection & |
| Get const reference to surface collection. More... | |
| auto | volumes () -> VolumeCollection & |
| Get mutable reference to volume collection. More... | |
| auto | volumes () const -> const VolumeCollection & |
| Get const reference to volume collection. More... | |
| auto | hasPoints () const -> bool |
| Returns true if the set holds points. More... | |
| auto | hasSegments () const -> bool |
| Returns true if the set holds segments. More... | |
| auto | hasSurfaces () const -> bool |
| Returns true if the set holds surfaces. More... | |
| auto | hasVolumes () const -> bool |
| Returns true if the set holds volumes. More... | |
| auto | recompose () const -> std::unique_ptr< Geometry > |
| convert the set to a SFCGAL::Geometry More... | |
| void | filterCovered (GeometrySet< Dim > &output) const |
| Filter (remove) primitives that are already covered by others. More... | |
| template<> | |
| void | addPrimitive (const PrimitiveHandle< 2 > &primitiveHandle) |
| Add primitive to 2D geometry set from primitive handle. More... | |
| template<> | |
| void | addPrimitive (const PrimitiveHandle< 3 > &primitiveHandle) |
| Add primitive to 3D geometry set from primitive handle. More... | |
| template<> | |
| void | addPrimitive (const CGAL::Object &object, bool pointsAsRing) |
| Add primitive to 3D geometry set from CGAL object. More... | |
| template<> | |
| void | addPrimitive (const CGAL::Object &object, bool pointsAsRing) |
| Add primitive to 2D geometry set from CGAL object. More... | |
| template<> | |
| void | addPrimitive (const TypeForDimension< 2 >::Surface &surface, int flags) |
| Add 2D surface primitive to geometry set. More... | |
| template<> | |
| void | addPrimitive (const TypeForDimension< 3 >::Surface &surface, int flags) |
| Add 3D surface primitive to geometry set. More... | |
| template<> | |
| void | addPrimitive ([[maybe_unused]] const TypeForDimension< 2 >::Volume &volume,[[maybe_unused]] int flags) |
| Add 2D volume primitive to geometry set (no-op for 2D) More... | |
| template<> | |
| void | addPrimitive (const TypeForDimension< 3 >::Volume &volume, int flags) |
| Add 3D volume primitive to geometry set. More... | |
| template<> | |
| auto | hasSurfaces () const -> bool |
| Check if 2D geometry set has surfaces. More... | |
| template<> | |
| auto | hasSurfaces () const -> bool |
| Check if 3D geometry set has surfaces. More... | |
| template<> | |
| auto | hasVolumes () const -> bool |
| Check if 2D geometry set has volumes. More... | |
| template<> | |
| auto | hasVolumes () const -> bool |
| Check if 3D geometry set has volumes. More... | |
| template<> | |
| void | addBoundary (const TypeForDimension< 2 >::Surface &surface) |
| Add boundary segments from 2D surface. More... | |
| template<> | |
| void | addBoundary ([[maybe_unused]] const TypeForDimension< 3 >::Surface &surface) |
| Add boundary from 3D surface (not implemented) More... | |
| template<> | |
| auto | dimension () const -> int |
| Get maximum geometry dimension for 2D set. More... | |
| template<> | |
| auto | dimension () const -> int |
| Get maximum geometry dimension for 3D set. More... | |
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)
| using SFCGAL::detail::GeometrySet< Dim >::PointCollection = std::set<CollectionElement<typename Point_d<Dim>::Type>> |
Ordered set of point elements (dimension 0 primitives)
| using SFCGAL::detail::GeometrySet< Dim >::SegmentCollection = std::set<CollectionElement<typename Segment_d<Dim>::Type>> |
Ordered set of segment elements (dimension 1 primitives)
| using SFCGAL::detail::GeometrySet< Dim >::SurfaceCollection = std::list<CollectionElement<typename Surface_d<Dim>::Type>> |
List of surface elements (dimension 2 primitives)
| using SFCGAL::detail::GeometrySet< Dim >::VolumeCollection = std::list<CollectionElement<typename Volume_d<Dim>::Type>> |
List of volume elements (dimension 3 primitives)
|
default |
| SFCGAL::detail::GeometrySet< Dim >::GeometrySet | ( | const Geometry & | g | ) |
Construct a GeometrySet from a SFCGAL::Geometry.
| g | The geometry to convert to GeometrySet |
| SFCGAL::detail::GeometrySet< Dim >::GeometrySet | ( | const typename TypeForDimension< Dim >::Point & | g, |
| int | flags = 0 |
||
| ) |
Construct a GeometrySet from a Point.
| g | The point to add to the set |
| flags | Optional flags for the point |
| SFCGAL::detail::GeometrySet< Dim >::GeometrySet | ( | const typename TypeForDimension< Dim >::Segment & | g, |
| int | flags = 0 |
||
| ) |
Construct a GeometrySet from a Segment.
| g | The segment to add to the set |
| flags | Optional flags for the segment |
| SFCGAL::detail::GeometrySet< Dim >::GeometrySet | ( | const typename TypeForDimension< Dim >::Surface & | g, |
| int | flags = 0 |
||
| ) |
Construct a GeometrySet from a Surface.
| g | The surface to add to the set |
| flags | Optional flags for the surface |
| SFCGAL::detail::GeometrySet< Dim >::GeometrySet | ( | const typename TypeForDimension< Dim >::Volume & | g, |
| int | flags = 0 |
||
| ) |
Construct a GeometrySet from a Volume.
| g | The volume to add to the set |
| flags | Optional flags for the volume |
| void SFCGAL::detail::GeometrySet< Dim >::addBoundary | ( | const typename TypeForDimension< Dim >::Surface & | surface | ) |
Add the boundary (segments) of a surface.
| surface | The surface whose boundary to add |
| void SFCGAL::detail::GeometrySet< Dim >::addBoundary | ( | const typename TypeForDimension< Dim >::Volume & | volume | ) |
Add the boundary (surfaces) of a volume.
| volume | The volume whose boundary to add |
| void SFCGAL::detail::GeometrySet< 2 >::addBoundary | ( | const TypeForDimension< 2 >::Surface & | surface | ) |
Add boundary segments from 2D surface.
| surface | The surface whose boundary to add |
| void SFCGAL::detail::GeometrySet< 3 >::addBoundary | ( | [[maybe_unused] ] const TypeForDimension< 3 >::Surface & | surface | ) |
Add boundary from 3D surface (not implemented)
| surface | The surface (unused) |
| void SFCGAL::detail::GeometrySet< Dim >::addGeometry | ( | const Geometry & | g | ) |
Add a geometry by decomposing it into CGAL primitives.
| g | The geometry to decompose and add |
|
inline |
Add multiple points from iterator range.
| ibegin | Iterator to first point |
| iend | Iterator to end of points |
| void SFCGAL::detail::GeometrySet< 2 >::addPrimitive | ( | const PrimitiveHandle< 2 > & | primitiveHandle | ) |
Add primitive to 2D geometry set from primitive handle.
| primitiveHandle | The primitive handle to add |
| void SFCGAL::detail::GeometrySet< 3 >::addPrimitive | ( | const PrimitiveHandle< 3 > & | primitiveHandle | ) |
Add primitive to 3D geometry set from primitive handle.
| primitiveHandle | The primitive handle to add |
| void SFCGAL::detail::GeometrySet< 3 >::addPrimitive | ( | const CGAL::Object & | object, |
| bool | pointsAsRing | ||
| ) |
Add primitive to 3D geometry set from CGAL object.
| object | The CGAL object to add as primitive |
| pointsAsRing | If true, build polygon from point vector |
| void SFCGAL::detail::GeometrySet< Dim >::addPrimitive | ( | const PrimitiveHandle< Dim > & | handle | ) |
add a primitive from a PrimitiveHandle to the set
| handle | The primitive handle to add |
| void SFCGAL::detail::GeometrySet< Dim >::addPrimitive | ( | const CGAL::Object & | obj, |
| bool | pointsAsRing = false |
||
| ) |
add a primitive from a CGAL::Object to the set pointsAsRing : if set to true, build a polygon if obj is a vector of points
| obj | The CGAL object to add as primitive |
| pointsAsRing | If true, build polygon from point vector |
| void SFCGAL::detail::GeometrySet< 2 >::addPrimitive | ( | const CGAL::Object & | object, |
| bool | pointsAsRing | ||
| ) |
Add primitive to 2D geometry set from CGAL object.
| object | The CGAL object to add as primitive |
| pointsAsRing | If true, build polygon from point vector |
| void SFCGAL::detail::GeometrySet< Dim >::addPrimitive | ( | const typename TypeForDimension< Dim >::Point & | point, |
| int | flags = 0 |
||
| ) |
add a point to the set
| point | The point to add |
| flags | Optional flags for the point |
| void SFCGAL::detail::GeometrySet< Dim >::addPrimitive | ( | const typename TypeForDimension< Dim >::Segment & | segment, |
| int | flags = 0 |
||
| ) |
add a segment to the set
| segment | The segment to add |
| flags | Optional flags for the segment |
| void SFCGAL::detail::GeometrySet< Dim >::addPrimitive | ( | const typename TypeForDimension< Dim >::Surface & | g, |
| int | flags = 0 |
||
| ) |
add a surface to the set
| g | The surface to add |
| flags | Optional flags for the surface |
| void SFCGAL::detail::GeometrySet< 2 >::addPrimitive | ( | const TypeForDimension< 2 >::Surface & | surface, |
| int | flags | ||
| ) |
Add 2D surface primitive to geometry set.
| surface | The surface to add |
| flags | Optional flags for the surface |
| void SFCGAL::detail::GeometrySet< Dim >::addPrimitive | ( | const typename TypeForDimension< Dim >::Volume & | g, |
| int | flags = 0 |
||
| ) |
add a volume to the set
| g | The volume to add |
| flags | Optional flags for the volume |
| void SFCGAL::detail::GeometrySet< 3 >::addPrimitive | ( | const TypeForDimension< 3 >::Surface & | surface, |
| int | flags | ||
| ) |
Add 3D surface primitive to geometry set.
| surface | The surface to add |
| flags | Optional flags for the surface |
| void SFCGAL::detail::GeometrySet< 2 >::addPrimitive | ( | [[maybe_unused] ] const TypeForDimension< 2 >::Volume & | volume, |
| [[maybe_unused] ] int | flags | ||
| ) |
Add 2D volume primitive to geometry set (no-op for 2D)
| volume | The volume (unused in 2D) |
| flags | The flags (unused) |
| void SFCGAL::detail::GeometrySet< 3 >::addPrimitive | ( | const TypeForDimension< 3 >::Volume & | volume, |
| int | flags | ||
| ) |
Add 3D volume primitive to geometry set.
| volume | The volume to add |
| flags | Optional flags for the volume |
|
inline |
Add multiple segments from iterator range.
| ibegin | Iterator to first segment |
| iend | Iterator to end of segments |
|
inline |
Add multiple surfaces from iterator range.
| ibegin | Iterator to first surface |
| iend | Iterator to end of surfaces |
|
inline |
Add multiple volumes from iterator range.
| ibegin | Iterator to first volume |
| iend | Iterator to end of volumes |
| void SFCGAL::detail::GeometrySet< Dim >::collectPoints | ( | const PrimitiveHandle< Dim > & | b | ) |
collect all points of b and add them to the point list
| b | The primitive handle to extract points from |
| 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.
| handles | Output collection to store primitive handles |
| boxes | Output collection to store bounding boxes |
| auto SFCGAL::detail::GeometrySet< Dim >::dimension | ( | ) | const -> int |
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.
| auto SFCGAL::detail::GeometrySet< 2 >::dimension | ( | ) | const -> int |
Get maximum geometry dimension for 2D set.
| auto SFCGAL::detail::GeometrySet< 3 >::dimension | ( | ) | const -> int |
Get maximum geometry dimension for 3D set.
| void SFCGAL::detail::GeometrySet< Dim >::filterCovered | ( | GeometrySet< Dim > & | output | ) | const |
Filter (remove) primitives that are already covered by others.
| output | The output geometry set with filtered primitives |
| auto SFCGAL::detail::GeometrySet< Dim >::hasPoints | ( | ) | const -> bool |
Returns true if the set holds points.
| auto SFCGAL::detail::GeometrySet< Dim >::hasSegments | ( | ) | const -> bool |
Returns true if the set holds segments.
| auto SFCGAL::detail::GeometrySet< 2 >::hasSurfaces | ( | ) | const -> bool |
Check if 2D geometry set has surfaces.
| auto SFCGAL::detail::GeometrySet< 3 >::hasSurfaces | ( | ) | const -> bool |
Check if 3D geometry set has surfaces.
| auto SFCGAL::detail::GeometrySet< Dim >::hasSurfaces | ( | ) | const -> bool |
Returns true if the set holds surfaces.
| auto SFCGAL::detail::GeometrySet< 2 >::hasVolumes | ( | ) | const -> bool |
Check if 2D geometry set has volumes.
| auto SFCGAL::detail::GeometrySet< 3 >::hasVolumes | ( | ) | const -> bool |
Check if 3D geometry set has volumes.
| auto SFCGAL::detail::GeometrySet< Dim >::hasVolumes | ( | ) | const -> bool |
Returns true if the set holds volumes.
| void SFCGAL::detail::GeometrySet< Dim >::merge | ( | const GeometrySet< Dim > & | g | ) | -> void |
Add primitives from another set.
| g | The geometry set to merge from |
|
inline |
Get mutable reference to point collection.
|
inline |
Get const reference to point collection.
| auto SFCGAL::detail::GeometrySet< Dim >::recompose | ( | ) | const -> std::unique_ptr<Geometry> |
convert the set to a SFCGAL::Geometry
|
inline |
Get mutable reference to segment collection.
|
inline |
Get const reference to segment collection.
|
inline |
Get mutable reference to surface collection.
|
inline |
Get const reference to surface collection.
|
inline |
Get mutable reference to volume collection.
|
inline |
Get const reference to volume collection.
1.8.10