37 #ifndef LVR2_UTIL_DEBUG_H_ 38 #define LVR2_UTIL_DEBUG_H_ 40 #include <boost/iostreams/device/null.hpp> 57 inline std::ostream&
dout()
63 static bool isDebug = getenv(
"LVR2_MESH_DEBUG") !=
nullptr;
64 static std::ofstream unopenedFile;
66 return isDebug ? cout : unopenedFile;
72 template<
typename BaseVecT>
88 template<
typename BaseVecT>
97 template<
typename BaseVecT>
100 string filename =
"debug-contours.ply",
107 #define DOINDEBUG(...) ; 109 #define DOINDEBUG(...) __VA_ARGS__ 114 #include "lvr2/util/Debug.tcc"
Interface for triangle-meshes with adjacency information.
vector< vector< VertexHandle > > getDuplicateVertices(const BaseMesh< BaseVecT > &mesh)
Returns all handles of duplicate vertices from the given mesh.
void writeDebugMesh(const BaseMesh< BaseVecT > &mesh, string filename="debug.ply", Rgb8Color color={255, 0, 0})
Write a mesh to the given filename and color it with the given color.
std::array< uint8_t, 3 > Rgb8Color
void writeDebugContourMesh(const BaseMesh< BaseVecT > &mesh, string filename="debug-contours.ply", Rgb8Color connectedColor={0, 255, 0}, Rgb8Color contourColor={0, 0, 255}, Rgb8Color bugColor={255, 0, 0})
Writes a mesh to the given filename and colors it with the following meaning: