SFCGAL  2.2.0
Public Types | Public Member Functions | List of all members
SFCGAL::PolyhedralSurface Class Reference

A PolyhedralSurface in SFA modeled as a Polygon soup. More...

#include <PolyhedralSurface.h>

Inheritance diagram for SFCGAL::PolyhedralSurface:
SFCGAL::Surface

Public Types

typedef boost::ptr_vector< Polygon >::iterator iterator
 
typedef boost::ptr_vector< Polygon >::const_iterator const_iterator
 
using value_type = Polygon
 
using reference = Polygon &
 
using const_reference = const Polygon &
 

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)
 Constructor from a CGAL::Surface_mesh. More...
 
 PolyhedralSurface (const InexactMesh &inexactMesh)
 
 PolyhedralSurface (const PolyhedralSurface &other)
 Copy constructor. More...
 
PolyhedralSurfaceoperator= (PolyhedralSurface other)
 assign operator More...
 
 ~PolyhedralSurface ()
 destructor More...
 
PolyhedralSurfaceclone () const override
 
std::string geometryType () const override
 
GeometryType geometryTypeId () const override
 
int dimension () const override
 
int coordinateDimension () const override
 
bool isEmpty () const override
 
bool is3D () const override
 
bool isMeasured () const override
 
auto dropZ () -> bool override
 
auto dropM () -> bool override
 
auto swapXY () -> void override
 
TriangulatedSurface toTriangulatedSurface () const
 Convert PolyhedralSurface to TriangulatedSurface. More...
 
auto numPatches () const -> size_t
 [SFA/OGC]Returns the number of patches More...
 
size_t numPolygons () const
 [SFA/OGC]Returns the number of polygons More...
 
const PolygonpatchN (size_t const &n) const
 [SFA/OGC]Returns the n-th patch More...
 
PolygonpatchN (size_t const &n)
 [SFA/OGC]Returns the n-th patch More...
 
void addPatch (const Polygon &polygon)
 add a patch to the PolyhedralSurface More...
 
void addPatch (Polygon *polygon)
 add a patch to the PolyhedralSurface More...
 
void addPatchs (const PolyhedralSurface &polyhedralSurface)
 add patches from an other PolyhedralSurface More...
 
const PolygonpolygonN (size_t const &n) const
 [SFA/OGC]Returns the n-th polygon More...
 
PolygonpolygonN (size_t const &n)
 [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 &n)
 Sets the n-th Geometry, starting at zero It needs to be a polygon. More...
 
void setPatchN (Geometry *geometry, size_t const &n)
 Sets the n-th Geometry, starting at zero It needs to be a polygon. More...
 
void setPatchN (const Polygon &patch, size_t const &n)
 Sets the n-th Patch, starting at zero. More...
 
void setPatchN (Polygon *patch, size_t const &n)
 Sets the n-th Patch, starting at zero The ownership of the polygon is taken. More...
 
template<typename K , typename Polyhedron >
std::unique_ptr< Polyhedron > toPolyhedron_3 () const
 Convert to CGAL::Polyhedron_3. More...
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
void accept (GeometryVisitor &visitor) override
 
void accept (ConstGeometryVisitor &visitor) const override
 
template<class Archive >
void serialize (Archive &ar, const unsigned int)
 Serializer. More...
 
void push_back (const Polygon &polygon)
 
- Public Member Functions inherited from SFCGAL::Surface
virtual ~Surface ()
 destructor More...
 
int dimension () const override
 

Additional Inherited Members

- Protected Member Functions inherited from SFCGAL::Surface
 Surface ()
 [OGC/SFS]"The area of this Surface, as measured in the spatial reference system of this Surface" More...
 
 Surface (Surface const &other)
 no copy constructor More...
 

Detailed Description

A PolyhedralSurface in SFA modeled as a Polygon soup.

Todo:
do better than a "polygon soup" or add topological view?

Member Typedef Documentation

Constructor & Destructor Documentation

SFCGAL::PolyhedralSurface::PolyhedralSurface ( )
default

Empty PolyhedralSurface constructor.

SFCGAL::PolyhedralSurface::PolyhedralSurface ( const std::vector< Polygon > &  polygons)

Constructor with a vector of polygons.

SFCGAL::PolyhedralSurface::PolyhedralSurface ( const std::unique_ptr< Geometry > &  geometry)

Constructor with a Geometry.

template<typename Polyhedron >
SFCGAL::PolyhedralSurface::PolyhedralSurface ( const Polyhedron &  poly)
inline

Constructor from a Polyhedron (detail::MarkedPolyhedron or CGAL::Polyhedron_3)

SFCGAL::PolyhedralSurface::PolyhedralSurface ( const Mesh &  sm)

Constructor from a CGAL::Surface_mesh.

SFCGAL::PolyhedralSurface::PolyhedralSurface ( const InexactMesh &  inexactMesh)
SFCGAL::PolyhedralSurface::PolyhedralSurface ( const PolyhedralSurface other)
default

Copy constructor.

SFCGAL::PolyhedralSurface::~PolyhedralSurface ( )
default

destructor

Member Function Documentation

void SFCGAL::PolyhedralSurface::accept ( GeometryVisitor visitor)
override
void SFCGAL::PolyhedralSurface::accept ( ConstGeometryVisitor visitor) const
override
void SFCGAL::PolyhedralSurface::addPatch ( const Polygon polygon)

add a patch to the PolyhedralSurface

void SFCGAL::PolyhedralSurface::addPatch ( Polygon polygon)

add a patch to the PolyhedralSurface

void SFCGAL::PolyhedralSurface::addPatchs ( const PolyhedralSurface polyhedralSurface)

add patches from an other PolyhedralSurface

void SFCGAL::PolyhedralSurface::addPolygon ( const Polygon polygon)

add a polygon to the PolyhedralSurface

Deprecated:
see addPatch()
void SFCGAL::PolyhedralSurface::addPolygon ( Polygon polygon)

add a polygon to the PolyhedralSurface

Deprecated:
see addPatch()
void SFCGAL::PolyhedralSurface::addPolygons ( const PolyhedralSurface polyhedralSurface)

add polygons from an other PolyhedralSurface

Deprecated:
see addPatchs()
iterator SFCGAL::PolyhedralSurface::begin ( )
inline
const_iterator SFCGAL::PolyhedralSurface::begin ( ) const
inline
auto SFCGAL::PolyhedralSurface::clone ( ) const
override
auto SFCGAL::PolyhedralSurface::coordinateDimension ( ) const
override
auto SFCGAL::PolyhedralSurface::dimension ( ) const
override
auto SFCGAL::PolyhedralSurface::dropM ( ) -> bool
override
auto SFCGAL::PolyhedralSurface::dropZ ( ) -> bool
override
iterator SFCGAL::PolyhedralSurface::end ( )
inline
const_iterator SFCGAL::PolyhedralSurface::end ( ) const
inline
auto SFCGAL::PolyhedralSurface::geometryType ( ) const
override
auto SFCGAL::PolyhedralSurface::geometryTypeId ( ) const
override
auto SFCGAL::PolyhedralSurface::is3D ( ) const
override
auto SFCGAL::PolyhedralSurface::isEmpty ( ) const
override
auto SFCGAL::PolyhedralSurface::isMeasured ( ) const
override
auto SFCGAL::PolyhedralSurface::numPatches ( ) const -> size_t
inline

[SFA/OGC]Returns the number of patches

Warning
PolyhedralSurface is treated as one geometry. numGeometries returns 1 or 0 for empty PolyhedralSurface
size_t SFCGAL::PolyhedralSurface::numPolygons ( ) const
inline

[SFA/OGC]Returns the number of polygons

Warning
PolyhedralSurface is treated as one geometry. numGeometries returns 1 or 0 for empty PolyhedralSurface
Deprecated:
see numPatches
See also
numGeometries()
auto SFCGAL::PolyhedralSurface::operator= ( PolyhedralSurface  other)

assign operator

const Polygon& SFCGAL::PolyhedralSurface::patchN ( size_t const &  n) const
inline

[SFA/OGC]Returns the n-th patch

Polygon& SFCGAL::PolyhedralSurface::patchN ( size_t const &  n)
inline

[SFA/OGC]Returns the n-th patch

const Polygon& SFCGAL::PolyhedralSurface::polygonN ( size_t const &  n) const
inline

[SFA/OGC]Returns the n-th polygon

Deprecated:
see patchN()
Polygon& SFCGAL::PolyhedralSurface::polygonN ( size_t const &  n)
inline

[SFA/OGC]Returns the n-th polygon

Deprecated:
see patchN()
void SFCGAL::PolyhedralSurface::push_back ( const Polygon polygon)
inline
template<class Archive >
void SFCGAL::PolyhedralSurface::serialize ( Archive &  ar,
const unsigned  int 
)
inline

Serializer.

void SFCGAL::PolyhedralSurface::setPatchN ( const Geometry &  geometry,
size_t const &  n 
)

Sets the n-th Geometry, starting at zero It needs to be a polygon.

void SFCGAL::PolyhedralSurface::setPatchN ( Geometry *  geometry,
size_t const &  n 
)

Sets the n-th Geometry, starting at zero It needs to be a polygon.

The ownership of the polygon is taken. The caller is not responsible anymore of its deallocation.

void SFCGAL::PolyhedralSurface::setPatchN ( const Polygon patch,
size_t const &  n 
)

Sets the n-th Patch, starting at zero.

void SFCGAL::PolyhedralSurface::setPatchN ( Polygon patch,
size_t const &  n 
)

Sets the n-th Patch, starting at zero The ownership of the polygon is taken.

The caller is not responsible anymore of its deallocation.

auto SFCGAL::PolyhedralSurface::swapXY ( ) -> void
override
template<typename K , typename Polyhedron >
std::unique_ptr<Polyhedron> SFCGAL::PolyhedralSurface::toPolyhedron_3 ( ) const
inline

Convert to CGAL::Polyhedron_3.

auto SFCGAL::PolyhedralSurface::toTriangulatedSurface ( ) const