DGtal  0.9.4.1
Static Public Member Functions
DGtal::MeshHelpers Class Reference

#include <DGtal/shapes/MeshHelpers.h>

Static Public Member Functions

template<typename Point >
static bool mesh2TriangulatedSurface (const Mesh< Point > &mesh, TriangulatedSurface< Point > &trisurf)
 
template<typename Point >
static bool mesh2PolygonalSurface (const Mesh< Point > &mesh, PolygonalSurface< Point > &polysurf)
 
template<typename DigitalSurfaceContainer , typename CellEmbedder , typename VertexMap >
static void digitalSurface2DualTriangulatedSurface (const DigitalSurface< DigitalSurfaceContainer > &dsurf, const CellEmbedder &cembedder, TriangulatedSurface< typename CellEmbedder::Value > &trisurf, VertexMap &vertexmap)
 
template<typename DigitalSurfaceContainer , typename CellEmbedder , typename VertexMap >
static void digitalSurface2DualPolygonalSurface (const DigitalSurface< DigitalSurfaceContainer > &dsurf, const CellEmbedder &cembedder, PolygonalSurface< typename CellEmbedder::Value > &polysurf, VertexMap &vertexmap)
 
template<typename Point >
static void triangulatedSurface2Mesh (const TriangulatedSurface< Point > &trisurf, Mesh< Point > &mesh)
 
template<typename Point >
static void polygonalSurface2Mesh (const PolygonalSurface< Point > &polysurf, Mesh< Point > &mesh)
 

Detailed Description

Aim: Static class that provides builder and converters between meshes.

Description of template class 'MeshHelpers'

Definition at line 62 of file MeshHelpers.h.

Member Function Documentation

◆ digitalSurface2DualPolygonalSurface()

template<typename DigitalSurfaceContainer , typename CellEmbedder , typename VertexMap >
static void DGtal::MeshHelpers::digitalSurface2DualPolygonalSurface ( const DigitalSurface< DigitalSurfaceContainer > &  dsurf,
const CellEmbedder &  cembedder,
PolygonalSurface< typename CellEmbedder::Value > &  polysurf,
VertexMap &  vertexmap 
)
static

Builds a polygonal surface (class PolygonalSurface) from the dual graph of a 2-dimensional digital surface in K^3 (class DigitalSurface).

Template Parameters
DigitalSurfaceContainerthe container chosen for the digital surface.
CellEmbedderthe embedder chosen for the digital surface.
Parameters
[in]dsurfthe input digital surface.
[in]cembedderthe embedder for 2-cells of the digital surface, which are vertices in the output polygonal surface.
[out]polysurfthe output polygonal surface mesh.
[out]vertexmapthe output mapping between a Vertex of dsurf and an Index in polysurf.

◆ digitalSurface2DualTriangulatedSurface()

template<typename DigitalSurfaceContainer , typename CellEmbedder , typename VertexMap >
static void DGtal::MeshHelpers::digitalSurface2DualTriangulatedSurface ( const DigitalSurface< DigitalSurfaceContainer > &  dsurf,
const CellEmbedder &  cembedder,
TriangulatedSurface< typename CellEmbedder::Value > &  trisurf,
VertexMap &  vertexmap 
)
static

Builds a triangulated surface (class TriangulatedSurface) from the dual graph of a 2-dimensional digital surface in K^3 (class DigitalSurface).

Note
that a triangulated surface contains only triangles, so faces of the input dual graph of the digital surface mesh are triangulated by adding a new vertex at the barycenter of the face vertices.
Template Parameters
DigitalSurfaceContainerthe container chosen for the digital surface.
CellEmbedderthe embedder chosen for the digital surface.
Parameters
[in]dsurfthe input digital surface.
[in]cembedderthe embedder for 2-cells of the digital surface, which are vertices in the output triangulated surface.
[out]trisurfthe output triangulated surface mesh.
[out]vertexmapthe output mapping between a Vertex of dsurf and an Index in trisurf.

◆ mesh2PolygonalSurface()

template<typename Point >
static bool DGtal::MeshHelpers::mesh2PolygonalSurface ( const Mesh< Point > &  mesh,
PolygonalSurface< Point > &  polysurf 
)
static

Builds a polygon mesh (class PolygonalSurface) from a mesh (class Mesh). The output polygonal surface rebuilds a topology between faces.

Template Parameters
Pointthe type for points.
Parameters
[in]meshthe input mesh.
[out]polysurfthe output polygonal surface mesh.
Returns
'true' on success, 'false' if the input mesh was not a combinatorial surface.

◆ mesh2TriangulatedSurface()

template<typename Point >
static bool DGtal::MeshHelpers::mesh2TriangulatedSurface ( const Mesh< Point > &  mesh,
TriangulatedSurface< Point > &  trisurf 
)
static

Builds a triangulated surface (class TriangulatedSurface) from a mesh (class Mesh). Note that a triangulated surface contains only triangles, so polygonal faces (0,1,2,3,4,...) of the input mesh are (naively) triangulated (triangles (0,1,2), (0,2,3), (0,3,4), etc). Furthermore, the output triangulated surface rebuilds a topology between faces.

Template Parameters
Pointthe type for points.
Parameters
[in]meshthe input mesh.
[out]trisurfthe output triangulated surface mesh.
Returns
'true' on success, 'false' if the input mesh was not a combinatorial surface.

◆ polygonalSurface2Mesh()

template<typename Point >
static void DGtal::MeshHelpers::polygonalSurface2Mesh ( const PolygonalSurface< Point > &  polysurf,
Mesh< Point > &  mesh 
)
static

Builds a mesh (class Mesh) from a polygon mesh (class PolygonalSurface). Note that the mesh looses the topology of the polygonal surface, since it is essentially a soup of triangles.

Template Parameters
Pointthe type for points.
Parameters
[in]polysurfthe input polygonal surface (ie a polygon mesh).
[in,out]meshthe output mesh (which should be empty).

◆ triangulatedSurface2Mesh()

template<typename Point >
static void DGtal::MeshHelpers::triangulatedSurface2Mesh ( const TriangulatedSurface< Point > &  trisurf,
Mesh< Point > &  mesh 
)
static

Builds a mesh (class Mesh) from a triangulated surface (class TriangulatedSurface). Note that the mesh looses the topology of the triangulated surface, since it is essentially a soup of triangles.

Template Parameters
Pointthe type for points.
Parameters
[in]trisurfthe input triangulated surface mesh.
[in,out]meshthe output mesh (which should be empty).

The documentation for this class was generated from the following file: