|
SFCGAL
2.3.0
|
A TriangulatedSurface in SFA modeled as a Triangle soup. More...
#include <TriangulatedSurface.h>
Inherits SFCGAL::GeometryImpl< Derived, Base >.
Public Types | |
| using | iterator = DereferenceIterator< std::vector< std::unique_ptr< Triangle >>::iterator > |
| Iterator type for triangulated surface patches. More... | |
| using | const_iterator = DereferenceIterator< std::vector< std::unique_ptr< Triangle >>::const_iterator > |
| Const iterator type for triangulated surface patches. More... | |
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... | |
| auto | operator= (TriangulatedSurface other) -> TriangulatedSurface & |
| assign operator More... | |
| ~TriangulatedSurface () 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 surface. More... | |
| auto | coordinateDimension () const -> int override |
| Get the coordinate dimension. More... | |
| auto | isEmpty () const -> bool override |
| Check if the surface is empty. More... | |
| auto | is3D () const -> bool override |
| Check if the surface has 3D coordinates. More... | |
| auto | isMeasured () const -> bool override |
| Check if the surface has measured coordinates. More... | |
| auto | dropZ () -> bool override |
| Drop Z coordinate from all points. More... | |
| auto | dropM () -> bool override |
| Drop M coordinate from all points. More... | |
| auto | swapXY () -> void override |
| Swap X and Y coordinates of all points. More... | |
| auto | numPatches () const -> size_t |
| [SFA/OGC]Returns the number of patches More... | |
| auto | patchN (size_t const &index) const -> const Triangle & |
| [SFA/OGC]Returns the n-th patch More... | |
| auto | patchN (size_t const &index) -> Triangle & |
| [SFA/OGC]Returns the n-th patch More... | |
| void | addPatch (const Triangle &patch) |
| Adds a patch to the TriangulatedSurface. More... | |
| void | addPatch (Triangle *patch) |
| Adds a patch to the TriangulatedSurface. More... | |
| void | addPatch (std::unique_ptr< Triangle > patch) |
| Adds a patch to the TriangulatedSurface. More... | |
| void | addPatches (const TriangulatedSurface &other) |
| add patches from an other TriangulatedSurface More... | |
| auto | numTriangles () const -> size_t |
| [SFA/OGC]Returns the number of triangles More... | |
| auto | triangleN (size_t const &index) const -> const Triangle & |
| [SFA/OGC]Returns the n-th triangle More... | |
| auto | triangleN (size_t const &index) -> Triangle & |
| [SFA/OGC]Returns the n-th triangle 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 | addTriangle (std::unique_ptr< 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 &idx) |
| Sets the n-th Geometry, starting at zero It needs to be a triangle. More... | |
| void | setPatchN (Geometry *geometry, size_t const &idx) |
| Sets the n-th Geometry, starting at zero It needs to be a triangle. More... | |
| void | setPatchN (std::unique_ptr< Geometry > geometry, size_t const &idx) |
| Sets the n-th patch in the TriangulatedSurface. More... | |
| void | setPatchN (const Triangle &triangle, size_t const &idx) |
| Sets the n-th Patch, starting at zero. More... | |
| void | setPatchN (Triangle *triangle, size_t const &idx) |
| Sets the n-th Patch, starting at zero The ownership of the polygon is taken. More... | |
| void | setPatchN (std::unique_ptr< Triangle > triangle, size_t const &idx) |
| Sets the n-th patch in the TriangulatedSurface. More... | |
| void | reserve (const size_t &count) |
| Reserve space for triangles. 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... | |
| template<typename Polyhedron > | |
| auto | toPolyhedron_3 () const -> std::unique_ptr< Polyhedron > |
| Converts the current TriangulatedSurface into a CGAL::Polyhedron_3. More... | |
| auto | toSurfaceMesh () const -> Surface_mesh_3 |
| Convert TriangulatedSurface 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... | |
A TriangulatedSurface in SFA modeled as a Triangle soup.
| using SFCGAL::TriangulatedSurface::const_iterator = DereferenceIterator< std::vector<std::unique_ptr<Triangle>>::const_iterator> |
Const iterator type for triangulated surface patches.
| using SFCGAL::TriangulatedSurface::iterator = DereferenceIterator<std::vector<std::unique_ptr<Triangle>>::iterator> |
Iterator type for triangulated surface patches.
|
default |
Empty TriangulatedSurface constructor.
| SFCGAL::TriangulatedSurface::TriangulatedSurface | ( | const std::vector< Triangle > & | triangle | ) |
Constructor with a vector of triangles.
| triangle | Vector of triangles to initialize the surface |
| SFCGAL::TriangulatedSurface::TriangulatedSurface | ( | const TriangulatedSurface & | other | ) |
Copy constructor.
| other | The triangulated 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 |
|
inline |
Adds a patch to the TriangulatedSurface.
| patch | The Triangle object representing the new patch to add. |
|
inline |
Adds a patch to the TriangulatedSurface.
| patch | A raw pointer to the Triangle object representing the new patch to add. Ownership of this patch is transferred to the TriangulatedSurface. |
|
inline |
Adds a patch to the TriangulatedSurface.
| patch | A unique pointer to the Triangle object representing the new patch to add. Ownership of this patch is moved into the TriangulatedSurface. |
| void SFCGAL::TriangulatedSurface::addPatches | ( | const TriangulatedSurface & | other | ) |
add patches from an other TriangulatedSurface
| other | The triangulated surface to add patches from |
|
inline |
add a Triangle to the TriangulatedSurface
| triangle | The triangle to add |
|
inline |
add a Triangle to the TriangulatedSurface
| triangle | Pointer to the triangle to add |
|
inline |
add a Triangle to the TriangulatedSurface
| triangle | Unique pointer to the triangle to add |
| void SFCGAL::TriangulatedSurface::addTriangles | ( | const TriangulatedSurface & | other | ) |
add triangles from an other TriangulatedSurface
| other | The triangulated surface to copy triangles 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 surface.
|
override |
Drop M coordinate from all points.
|
override |
Drop Z coordinate from all points.
|
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 surface has 3D coordinates.
|
override |
Check if the surface is empty.
|
override |
Check if the surface has measured coordinates.
| auto SFCGAL::TriangulatedSurface::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 triangles
| auto SFCGAL::TriangulatedSurface::operator= | ( | TriangulatedSurface | other | ) | -> TriangulatedSurface & |
assign operator
| other | The triangulated surface to assign from |
| auto SFCGAL::TriangulatedSurface::patchN | ( | size_t const & | index | ) | const -> const Triangle & |
[SFA/OGC]Returns the n-th patch
| index | The index of the patch to get |
| auto SFCGAL::TriangulatedSurface::patchN | ( | size_t const & | index | ) | -> Triangle & |
[SFA/OGC]Returns the n-th patch
| index | The index of the patch to get |
| void SFCGAL::TriangulatedSurface::reserve | ( | const size_t & | count | ) |
Reserve space for triangles.
| count | Number of triangles to reserve space for |
|
inline |
Serializer.
| ar | Archive for serialization |
| void SFCGAL::TriangulatedSurface::setPatchN | ( | const Geometry & | geometry, |
| size_t const & | idx | ||
| ) |
Sets the n-th Geometry, starting at zero It needs to be a triangle.
| geometry | The geometry to set (must be a triangle) |
| idx | The index of the patch to set |
| void SFCGAL::TriangulatedSurface::setPatchN | ( | Geometry * | geometry, |
| size_t const & | idx | ||
| ) |
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.
| geometry | Pointer to the geometry to set (must be a triangle) |
| idx | The index of the patch to set |
| void SFCGAL::TriangulatedSurface::setPatchN | ( | std::unique_ptr< Geometry > | geometry, |
| size_t const & | idx | ||
| ) |
Sets the n-th patch in the TriangulatedSurface.
Replaces the patch at the specified index with the provided one. Only Triangle 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::TriangulatedSurface::setPatchN | ( | const Triangle & | triangle, |
| size_t const & | idx | ||
| ) |
Sets the n-th Patch, starting at zero.
| triangle | The triangle to set |
| idx | The index of the patch to set |
| void SFCGAL::TriangulatedSurface::setPatchN | ( | Triangle * | triangle, |
| size_t const & | idx | ||
| ) |
Sets the n-th Patch, starting at zero The ownership of the polygon is taken.
The caller is not responsible anymore of its deallocation.
| triangle | Pointer to the triangle to set |
| idx | The index of the patch to set |
| void SFCGAL::TriangulatedSurface::setPatchN | ( | std::unique_ptr< Triangle > | triangle, |
| size_t const & | idx | ||
| ) |
Sets the n-th patch in the TriangulatedSurface.
Replaces the patch at the specified index with the provided one. Indexing starts at zero.
| triangle | A unique pointer to the Triangle 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 points.
| auto SFCGAL::TriangulatedSurface::toPolyhedron_3 | ( | ) | const -> std::unique_ptr<Polyhedron> |
Converts the current TriangulatedSurface into a CGAL::Polyhedron_3.
This function creates a new Polyhedron instance that represents the geometry of the TriangulatedSurface.
| Polyhedron | The CGAL Polyhedron_3 type. |
| auto SFCGAL::TriangulatedSurface::toSurfaceMesh | ( | ) | const -> Surface_mesh_3 |
Convert TriangulatedSurface to CGAL::Surface_mesh.
|
inline |
[SFA/OGC]Returns the n-th triangle
| index | The triangle index |
|
inline |
[SFA/OGC]Returns the n-th triangle
| index | The triangle index |
1.8.10