DGtal  0.9.4.1
MeshHelpers.h
1 
17 #pragma once
18 
31 #if defined(MeshHelpers_RECURSES)
32 #error Recursive header files inclusion detected in MeshHelpers.h
33 #else // defined(MeshHelpers_RECURSES)
34 
35 #define MeshHelpers_RECURSES
36 
37 #if !defined MeshHelpers_h
38 
39 #define MeshHelpers_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/topology/CCellEmbedder.h"
46 #include "DGtal/topology/CDigitalSurfaceContainer.h"
47 #include "DGtal/topology/DigitalSurface.h"
48 #include "DGtal/shapes/TriangulatedSurface.h"
49 #include "DGtal/shapes/PolygonalSurface.h"
50 #include "DGtal/shapes/Mesh.h"
52 
53 namespace DGtal
54 {
55 
57  // template class MeshHelpers
63  {
64  // ----------------------- Static services ------------------------------
65  public:
79  template <typename Point>
80  static
82  ( const Mesh<Point>& mesh,
83  TriangulatedSurface<Point>& trisurf );
84 
95  template <typename Point>
96  static
98  ( const Mesh<Point>& mesh,
99  PolygonalSurface<Point>& polysurf );
100 
117  template < typename DigitalSurfaceContainer,
118  typename CellEmbedder,
119  typename VertexMap >
120  static
123  const CellEmbedder& cembedder,
125  VertexMap& vertexmap );
126 
138  template < typename DigitalSurfaceContainer,
139  typename CellEmbedder,
140  typename VertexMap >
141  static
144  const CellEmbedder& cembedder,
146  VertexMap& vertexmap );
147 
148 
157  template <typename Point>
158  static
160  ( const TriangulatedSurface<Point>& trisurf,
161  Mesh<Point>& mesh );
162 
171  template <typename Point>
172  static
174  ( const PolygonalSurface<Point>& polysurf,
175  Mesh<Point>& mesh );
176 
177  }; // end of class MeshHelpers
178 
179 } // namespace DGtal
180 
181 
183 // Includes inline functions.
184 #include "DGtal/shapes/MeshHelpers.ih"
185 
186 // //
188 
189 #endif // !defined MeshHelpers_h
190 
191 #undef MeshHelpers_RECURSES
192 #endif // else defined(MeshHelpers_RECURSES)
static void digitalSurface2DualTriangulatedSurface(const DigitalSurface< DigitalSurfaceContainer > &dsurf, const CellEmbedder &cembedder, TriangulatedSurface< typename CellEmbedder::Value > &trisurf, VertexMap &vertexmap)
static void polygonalSurface2Mesh(const PolygonalSurface< Point > &polysurf, Mesh< Point > &mesh)
static void digitalSurface2DualPolygonalSurface(const DigitalSurface< DigitalSurfaceContainer > &dsurf, const CellEmbedder &cembedder, PolygonalSurface< typename CellEmbedder::Value > &polysurf, VertexMap &vertexmap)
Aim: This class is defined to represent a surface mesh through a set of vertices and faces...
Definition: Mesh.h:91
Aim: Represents a set of n-1-cells in a nD space, together with adjacency relation between these cell...
static void triangulatedSurface2Mesh(const TriangulatedSurface< Point > &trisurf, Mesh< Point > &mesh)
static bool mesh2PolygonalSurface(const Mesh< Point > &mesh, PolygonalSurface< Point > &polysurf)
Aim: Represents a triangulated surface. The topology is stored with a half-edge data structure...
DGtal is the top-level namespace which contains all DGtal functions and types.
static bool mesh2TriangulatedSurface(const Mesh< Point > &mesh, TriangulatedSurface< Point > &trisurf)
Aim: Static class that provides builder and converters between meshes.
Definition: MeshHelpers.h:62
Aim: Represents a polygon mesh, i.e. a 2-dimensional combinatorial surface whose faces are (topologic...