|
SFCGAL
2.3.0
|
A PolyhedralSurface in SFA modeled as a Polygon soup. More...
#include <PolyhedralSurface.h>
Inherits SFCGAL::GeometryImpl< Derived, Base >.
Public Types | |
| using | iterator = DereferenceIterator< std::vector< std::unique_ptr< Polygon >>::iterator > |
| Iterator type for polyhedral surface patches. More... | |
| using | const_iterator = DereferenceIterator< std::vector< std::unique_ptr< Polygon >>::const_iterator > |
| Const iterator type for polyhedral surface patches. More... | |
| using | value_type = Polygon |
| Value type for container compatibility. More... | |
| using | reference = Polygon & |
| Reference type for container compatibility. More... | |
| using | const_reference = const Polygon & |
| Const reference type for container compatibility. More... | |
Public Member Functions | |
| PolyhedralSurface () | |
| Empty PolyhedralSurface constructor. More... | |
| PolyhedralSurface (const std::vector< Polygon > &polygons) | |
| Constructor with a vector of polygons. More... | |
| PolyhedralSurface (const std::unique_ptr< Geometry > &geometry) | |
| Constructor with a Geometry. More... | |
| template<typename Polyhedron > | |
| PolyhedralSurface (const Polyhedron &poly) | |
| Constructor from a Polyhedron (detail::MarkedPolyhedron or CGAL::Polyhedron_3) More... | |
| PolyhedralSurface (const Mesh &sm, bool simplifyTriangulation=true) | |
| Constructor from a CGAL::Surface_mesh. More... | |
| PolyhedralSurface (const InexactMesh &inexactMesh) | |
| Constructor from an inexact CGAL::Surface_mesh. More... | |
| PolyhedralSurface (const PolyhedralSurface &other) | |
| Copy constructor. More... | |
| auto | operator= (PolyhedralSurface other) -> PolyhedralSurface & |
| assign operator More... | |
| ~PolyhedralSurface () override | |
| destructor More... | |
| auto | geometryType () const -> std::string override |
| Get the geometry type as string. More... | |
| auto | geometryTypeId () const -> GeometryType override |
| Get the geometry type identifier. More... | |
| auto | dimension () const -> int override |
| Get the dimension of the polyhedral surface. More... | |
| auto | coordinateDimension () const -> int override |
| Get the coordinate dimension. More... | |
| auto | isEmpty () const -> bool override |
| Check if the polyhedral surface is empty. More... | |
| auto | is3D () const -> bool override |
| Check if the polyhedral surface has 3D coordinates. More... | |
| auto | isMeasured () const -> bool override |
| Check if the polyhedral surface has measured coordinates. More... | |
| auto | dropZ () -> bool override |
| Drop Z coordinate from all polygons. More... | |
| auto | dropM () -> bool override |
| Drop M coordinate from all polygons. More... | |
| auto | swapXY () -> void override |
| Swap X and Y coordinates of all polygons. More... | |
| auto | toTriangulatedSurface () const -> TriangulatedSurface |
| Convert PolyhedralSurface to TriangulatedSurface. More... | |
| auto | numPatches () const -> size_t |
| [SFA/OGC]Returns the number of patches More... | |
| auto | numPolygons () const -> size_t |
| [SFA/OGC]Returns the number of polygons More... | |
| auto | patchN (size_t const &index) const -> const Polygon & |
| [SFA/OGC]Returns the n-th patch More... | |
| auto | patchN (size_t const &index) -> Polygon & |
| [SFA/OGC]Returns the n-th patch More... | |
| void | addPatch (const Polygon &patch) |
| Adds a polygonal patch to the PolyhedralSurface. More... | |
| void | addPatch (Polygon *patch) |
| Adds a polygonal patch to the PolyhedralSurface. More... | |
| void | addPatch (std::unique_ptr< Polygon > patch) |
| Adds a polygonal patch to the PolyhedralSurface. More... | |
| void | addPatches (const PolyhedralSurface &polyhedralSurface) |
| add patches from an other PolyhedralSurface More... | |
| auto | polygonN (size_t const &index) const -> const Polygon & |
| [SFA/OGC]Returns the n-th polygon More... | |
| auto | polygonN (size_t const &index) -> Polygon & |
| [SFA/OGC]Returns the n-th polygon More... | |
| void | addPolygon (const Polygon &polygon) |
| add a polygon to the PolyhedralSurface More... | |
| void | addPolygon (Polygon *polygon) |
| add a polygon to the PolyhedralSurface More... | |
| void | addPolygons (const PolyhedralSurface &polyhedralSurface) |
| add polygons from an other PolyhedralSurface More... | |
| void | setPatchN (const Geometry &geometry, size_t const &idx) |
| Sets the n-th Geometry, starting at zero. More... | |
| void | setPatchN (Geometry *geometry, size_t const &idx) |
| Sets the n-th Geometry, starting at zero. More... | |
| void | setPatchN (std::unique_ptr< Geometry > geometry, size_t const &idx) |
| Sets the n-th patch in the PolyhedralSurface. More... | |
| void | setPatchN (const Polygon &patch, size_t const &idx) |
| Sets the n-th Patch, starting at zero. More... | |
| void | setPatchN (Polygon *patch, size_t const &idx) |
| Sets the n-th Patch, starting at zero. More... | |
| void | setPatchN (std::unique_ptr< Polygon > patch, size_t const &idx) |
| Sets the n-th patch in the PolyhedralSurface. More... | |
| template<typename Polyhedron > | |
| auto | toPolyhedron_3 () const -> std::unique_ptr< Polyhedron > |
| Convert to CGAL::Polyhedron_3. More... | |
| auto | begin () -> iterator |
| Get iterator to beginning of patches. More... | |
| auto | begin () const -> const_iterator |
| Get const iterator to beginning of patches. More... | |
| auto | end () -> iterator |
| Get iterator to end of patches. More... | |
| auto | end () const -> const_iterator |
| Get const iterator to end of patches. More... | |
| void | accept (GeometryVisitor &visitor) override |
| Accept a geometry visitor. More... | |
| void | accept (ConstGeometryVisitor &visitor) const override |
| Accept a const geometry visitor. More... | |
| auto | toSurfaceMesh () const -> Surface_mesh_3 |
| Convert PolyhedralSurface to CGAL::Surface_mesh. More... | |
| auto | numEdges () const -> size_t |
| Returns the number of edges in the geometry. More... | |
| template<class Archive > | |
| void | serialize (Archive &ar, const unsigned int) |
| Serializer. More... | |
| void | push_back (const Polygon &polygon) |
| Add a polygon patch (container compatibility) More... | |
A PolyhedralSurface in SFA modeled as a Polygon soup.
| using SFCGAL::PolyhedralSurface::const_iterator = DereferenceIterator< std::vector<std::unique_ptr<Polygon>>::const_iterator> |
Const iterator type for polyhedral surface patches.
| using SFCGAL::PolyhedralSurface::const_reference = const Polygon & |
Const reference type for container compatibility.
| using SFCGAL::PolyhedralSurface::iterator = DereferenceIterator<std::vector<std::unique_ptr<Polygon>>::iterator> |
Iterator type for polyhedral surface patches.
| using SFCGAL::PolyhedralSurface::reference = Polygon & |
Reference type for container compatibility.
Value type for container compatibility.
|
default |
Empty PolyhedralSurface constructor.
| SFCGAL::PolyhedralSurface::PolyhedralSurface | ( | const std::vector< Polygon > & | polygons | ) |
Constructor with a vector of polygons.
| polygons | Vector of polygons to initialize the surface |
| SFCGAL::PolyhedralSurface::PolyhedralSurface | ( | const std::unique_ptr< Geometry > & | geometry | ) |
Constructor with a Geometry.
| geometry | The geometry to convert to polyhedral surface |
|
inline |
Constructor from a Polyhedron (detail::MarkedPolyhedron or CGAL::Polyhedron_3)
| Polyhedron | The CGAL polyhedron type |
| poly | The polyhedron to convert |
| SFCGAL::PolyhedralSurface::PolyhedralSurface | ( | const Mesh & | sm, |
| bool | simplifyTriangulation = true |
||
| ) |
Constructor from a CGAL::Surface_mesh.
| sm | The surface mesh to convert |
| simplifyTriangulation | If set to true, the conversion reconstructs patches by merging adjacent triangles (i.e. removes the triangulation). Boundaries, including holes, are kept. |
If set to false, the output surface is fully triangulated.
| SFCGAL::PolyhedralSurface::PolyhedralSurface | ( | const InexactMesh & | inexactMesh | ) |
Constructor from an inexact CGAL::Surface_mesh.
| inexactMesh | The inexact surface mesh to convert |
| SFCGAL::PolyhedralSurface::PolyhedralSurface | ( | const PolyhedralSurface & | other | ) |
Copy constructor.
| other | The polyhedral surface to copy from |
|
overridedefault |
destructor
|
override |
Accept a geometry visitor.
| visitor | Visitor to accept |
|
override |
Accept a const geometry visitor.
| visitor | Const visitor to accept |
| void SFCGAL::PolyhedralSurface::addPatch | ( | const Polygon & | patch | ) |
Adds a polygonal patch to the PolyhedralSurface.
| patch | The Polygon object representing the new patch to add. |
| void SFCGAL::PolyhedralSurface::addPatch | ( | Polygon * | patch | ) |
Adds a polygonal patch to the PolyhedralSurface.
| patch | A raw pointer to the Polygon object representing the new patch to add. Ownership of this patch is moved into the PolyhedralSurface. |
| void SFCGAL::PolyhedralSurface::addPatch | ( | std::unique_ptr< Polygon > | patch | ) |
Adds a polygonal patch to the PolyhedralSurface.
| patch | A unique pointer to the Polygon object representing the new patch to add. Ownership of this patch is moved into the PolyhedralSurface. |
| void SFCGAL::PolyhedralSurface::addPatches | ( | const PolyhedralSurface & | polyhedralSurface | ) |
add patches from an other PolyhedralSurface
| polyhedralSurface | The polyhedral surface to add patches from |
| void SFCGAL::PolyhedralSurface::addPolygon | ( | const Polygon & | polygon | ) |
add a polygon to the PolyhedralSurface
| polygon | The polygon to add |
| void SFCGAL::PolyhedralSurface::addPolygon | ( | Polygon * | polygon | ) |
add a polygon to the PolyhedralSurface
| polygon | The polygon to add |
| void SFCGAL::PolyhedralSurface::addPolygons | ( | const PolyhedralSurface & | polyhedralSurface | ) |
add polygons from an other PolyhedralSurface
| polyhedralSurface | The polyhedral surface to add polygons from |
|
inline |
Get iterator to beginning of patches.
|
inline |
Get const iterator to beginning of patches.
|
override |
Get the coordinate dimension.
|
override |
Get the dimension of the polyhedral surface.
|
override |
Drop M coordinate from all polygons.
|
override |
Drop Z coordinate from all polygons.
|
inline |
Get iterator to end of patches.
|
inline |
Get const iterator to end of patches.
|
override |
Get the geometry type as string.
|
override |
Get the geometry type identifier.
|
override |
Check if the polyhedral surface has 3D coordinates.
|
override |
Check if the polyhedral surface is empty.
|
override |
Check if the polyhedral surface has measured coordinates.
| auto SFCGAL::PolyhedralSurface::numEdges | ( | ) | const -> size_t |
Returns the number of edges in the geometry.
Convert the geometry to a CGAL::Surface_mesh and use the mesh number_of_edges accessor. As the conversion to a Surface mesh may be costly, it is advised not to call this method into a for-loop.
|
inline |
[SFA/OGC]Returns the number of patches
|
inline |
[SFA/OGC]Returns the number of polygons
| auto SFCGAL::PolyhedralSurface::operator= | ( | PolyhedralSurface | other | ) | -> PolyhedralSurface & |
assign operator
| other | The polyhedral surface to assign from |
|
inline |
[SFA/OGC]Returns the n-th patch
| index | The index of the patch to get |
|
inline |
[SFA/OGC]Returns the n-th patch
| index | The index of the patch to get |
|
inline |
[SFA/OGC]Returns the n-th polygon
| index | Index of the polygon to get |
|
inline |
[SFA/OGC]Returns the n-th polygon
| index | Index of the polygon to get |
|
inline |
Add a polygon patch (container compatibility)
| polygon | The polygon to add as a patch |
|
inline |
Serializer.
| ar | Archive for serialization |
| void SFCGAL::PolyhedralSurface::setPatchN | ( | const Geometry & | geometry, |
| size_t const & | idx | ||
| ) |
Sets the n-th Geometry, starting at zero.
| geometry | Geometry to set (must be a polygon) |
| idx | Index of the patch to set |
| void SFCGAL::PolyhedralSurface::setPatchN | ( | Geometry * | geometry, |
| size_t const & | idx | ||
| ) |
Sets the n-th Geometry, starting at zero.
| geometry | Pointer to geometry (must be a polygon) |
| idx | Index of the patch to set |
| void SFCGAL::PolyhedralSurface::setPatchN | ( | std::unique_ptr< Geometry > | geometry, |
| size_t const & | idx | ||
| ) |
Sets the n-th patch in the PolyhedralSurface.
Replaces the patch at the specified index with the provided one. Only polygon geometries are allowed. Indexing starts at zero.
| geometry | A unique pointer to the Geometry object to set. Ownership is transferred to this class. |
| idx | The zero-based index of the patch to replace. |
| void SFCGAL::PolyhedralSurface::setPatchN | ( | const Polygon & | patch, |
| size_t const & | idx | ||
| ) |
Sets the n-th Patch, starting at zero.
| patch | Polygon patch to set |
| idx | Index of the patch to set |
| void SFCGAL::PolyhedralSurface::setPatchN | ( | Polygon * | patch, |
| size_t const & | idx | ||
| ) |
Sets the n-th Patch, starting at zero.
| patch | Pointer to polygon patch |
| idx | Index of the patch to set |
| void SFCGAL::PolyhedralSurface::setPatchN | ( | std::unique_ptr< Polygon > | patch, |
| size_t const & | idx | ||
| ) |
Sets the n-th patch in the PolyhedralSurface.
Replaces the patch at the specified index with the provided one. Indexing starts at zero.
| patch | A unique pointer to the Polygon object to set. Ownership is transferred to this class. |
| idx | The zero-based index of the patch to replace. |
|
override |
Swap X and Y coordinates of all polygons.
|
inline |
Convert to CGAL::Polyhedron_3.
| auto SFCGAL::PolyhedralSurface::toSurfaceMesh | ( | ) | const -> Surface_mesh_3 |
Convert PolyhedralSurface to CGAL::Surface_mesh.
| auto SFCGAL::PolyhedralSurface::toTriangulatedSurface | ( | ) | const -> TriangulatedSurface |
Convert PolyhedralSurface to TriangulatedSurface.
1.8.10