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

A TriangulatedSurface in SFA modeled as a Triangle soup. More...

#include <TriangulatedSurface.h>

Inheritance diagram for SFCGAL::TriangulatedSurface:
SFCGAL::Surface

Public Types

typedef boost::ptr_vector< Triangle >::iterator iterator
 
typedef boost::ptr_vector< Triangle >::const_iterator const_iterator
 

Public Member Functions

 TriangulatedSurface ()
 Empty TriangulatedSurface constructor. More...
 
 TriangulatedSurface (const std::vector< Triangle > &triangle)
 Constructor with a vector of triangles. More...
 
 TriangulatedSurface (const TriangulatedSurface &other)
 Copy constructor. More...
 
TriangulatedSurfaceoperator= (TriangulatedSurface other)
 assign operator More...
 
 ~TriangulatedSurface ()
 destructor More...
 
TriangulatedSurfaceclone () 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
 
auto numPatches () const -> size_t
 [SFA/OGC]Returns the number of patches More...
 
auto patchN (size_t const &n) const -> const Triangle &
 [SFA/OGC]Returns the n-th patch More...
 
auto patchN (size_t const &n) -> Triangle &
 [SFA/OGC]Returns the n-th patch More...
 
void addPatch (const Triangle &patch)
 add a Patch to the TriangulatedSurface More...
 
void addPatch (Triangle *patch)
 add a Patch to the TriangulatedSurface More...
 
void addPatchs (const TriangulatedSurface &other)
 add patchs from an other TriangulatedSurface More...
 
size_t numTriangles () const
 [SFA/OGC]Returns the number of points More...
 
const TriangletriangleN (size_t const &n) const
 [SFA/OGC]Returns the n-th point More...
 
TriangletriangleN (size_t const &n)
 [SFA/OGC]Returns the n-th point More...
 
void addTriangle (const Triangle &triangle)
 add a Triangle to the TriangulatedSurface More...
 
void addTriangle (Triangle *triangle)
 add a Triangle to the TriangulatedSurface More...
 
void addTriangles (const TriangulatedSurface &other)
 add triangles from an other TriangulatedSurface More...
 
void setPatchN (const Geometry &geometry, size_t const &n)
 Sets the n-th Geometry, starting at zero It needs to be a triangle. More...
 
void setPatchN (Geometry *geometry, size_t const &n)
 Sets the n-th Geometry, starting at zero It needs to be a triangle. More...
 
void setPatchN (const Triangle &triangle, size_t const &n)
 Sets the n-th Patch, starting at zero. More...
 
void setPatchN (Triangle *triangle, size_t const &n)
 Sets the n-th Patch, starting at zero The ownership of the polygon is taken. More...
 
void reserve (const size_t &n)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
void accept (GeometryVisitor &visitor) override
 
void accept (ConstGeometryVisitor &visitor) const override
 
template<typename K , typename Polyhedron >
std::unique_ptr< Polyhedron > toPolyhedron_3 () const
 Converts a TriangulatedSurface to a CGAL::Polyhedron_3. More...
 
template<class Archive >
void serialize (Archive &ar, const unsigned int)
 Serializer. More...
 
template<typename K , typename Polyhedron >
auto toPolyhedron_3 () const -> std::unique_ptr< Polyhedron >
 
- 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 TriangulatedSurface in SFA modeled as a Triangle soup.

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

Member Typedef Documentation

Constructor & Destructor Documentation

SFCGAL::TriangulatedSurface::TriangulatedSurface ( )
default

Empty TriangulatedSurface constructor.

SFCGAL::TriangulatedSurface::TriangulatedSurface ( const std::vector< Triangle > &  triangle)

Constructor with a vector of triangles.

SFCGAL::TriangulatedSurface::TriangulatedSurface ( const TriangulatedSurface other)
default

Copy constructor.

SFCGAL::TriangulatedSurface::~TriangulatedSurface ( )
default

destructor

Member Function Documentation

void SFCGAL::TriangulatedSurface::accept ( GeometryVisitor visitor)
override
void SFCGAL::TriangulatedSurface::accept ( ConstGeometryVisitor visitor) const
override
void SFCGAL::TriangulatedSurface::addPatch ( const Triangle patch)
inline

add a Patch to the TriangulatedSurface

void SFCGAL::TriangulatedSurface::addPatch ( Triangle patch)
inline

add a Patch to the TriangulatedSurface

void SFCGAL::TriangulatedSurface::addPatchs ( const TriangulatedSurface other)

add patchs from an other TriangulatedSurface

void SFCGAL::TriangulatedSurface::addTriangle ( const Triangle triangle)
inline
void SFCGAL::TriangulatedSurface::addTriangle ( Triangle triangle)
inline
void SFCGAL::TriangulatedSurface::addTriangles ( const TriangulatedSurface other)

add triangles from an other TriangulatedSurface

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

[SFA/OGC]Returns the number of patches

Deprecated:
see numGeometries()
size_t SFCGAL::TriangulatedSurface::numTriangles ( ) const
inline

[SFA/OGC]Returns the number of points

Deprecated:
see numPatches()
auto SFCGAL::TriangulatedSurface::operator= ( TriangulatedSurface  other)

assign operator

auto SFCGAL::TriangulatedSurface::patchN ( size_t const &  n) const -> const Triangle &

[SFA/OGC]Returns the n-th patch

auto SFCGAL::TriangulatedSurface::patchN ( size_t const &  n) -> Triangle &

[SFA/OGC]Returns the n-th patch

void SFCGAL::TriangulatedSurface::reserve ( const size_t &  n)
template<class Archive >
void SFCGAL::TriangulatedSurface::serialize ( Archive &  ar,
const unsigned  int 
)
inline

Serializer.

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

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

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

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

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

void SFCGAL::TriangulatedSurface::setPatchN ( const Triangle triangle,
size_t const &  n 
)

Sets the n-th Patch, starting at zero.

void SFCGAL::TriangulatedSurface::setPatchN ( Triangle triangle,
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::TriangulatedSurface::swapXY ( ) -> void
override
template<typename K , typename Polyhedron >
std::unique_ptr<Polyhedron> SFCGAL::TriangulatedSurface::toPolyhedron_3 ( ) const

Converts a TriangulatedSurface to a CGAL::Polyhedron_3.

template<typename K , typename Polyhedron >
auto SFCGAL::TriangulatedSurface::toPolyhedron_3 ( ) const -> std::unique_ptr<Polyhedron>
const Triangle& SFCGAL::TriangulatedSurface::triangleN ( size_t const &  n) const
inline

[SFA/OGC]Returns the n-th point

Deprecated:
see patchN()
Triangle& SFCGAL::TriangulatedSurface::triangleN ( size_t const &  n)
inline

[SFA/OGC]Returns the n-th point

Deprecated:
see patchN()