DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
MeshWriter.h
1 
17 #pragma once
18 
31 #if defined(MeshWriter_RECURSES)
32 #error Recursive header files inclusion detected in MeshWriter.h
33 #else // defined(MeshWriter_RECURSES)
34 
35 #define MeshWriter_RECURSES
36 
37 #if !defined MeshWriter_h
38 
39 #define MeshWriter_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <string>
45 #include <boost/static_assert.hpp>
46 #include "DGtal/base/Common.h"
47 #include "DGtal/shapes/fromPoints/MeshFromPoints.h"
49 
50 namespace DGtal
51 {
52 
54  // template class MeshWriter
76  template <typename TPoint>
77  struct MeshWriter
78  {
79  // ----------------------- Standard services ------------------------------
80 
81 
82 
83 
93  static bool export2OFF(std::ostream &out, const MeshFromPoints<TPoint> &aMesh,
94  bool exportColor=false) throw(DGtal::IOException);
95 
96 
97 
98 
107  static bool export2OBJ(std::ostream &out, const MeshFromPoints<TPoint> &aMesh) throw(DGtal::IOException);
108 
109 
110  };
111 
112 
113 
114 
115 
125  template <typename TPoint>
126  bool
127  operator >> ( MeshFromPoints<TPoint> & aMesh, const std::string & aFilename );
128 
129 
130 
131 
132 
140  template <typename TPoint>
141  bool
142  operator >> ( MeshFromPoints<TPoint> & aMesh, ostream &out );
143 
144 
145 
146 
147 
148 
149 
150 }//namespace
151 
153 // Includes inline functions.
154 #include "DGtal/io/writers/MeshWriter.ih"
155 
156 // //
158 
159 #endif // !defined MeshWriter_h
160 
161 #undef MeshWriter_RECURSES
162 #endif // else defined(MeshWriter_RECURSES)