remove sprintf from edge collapse algorithms
This commit is contained in:
parent
feb2f2c3bc
commit
875d659719
|
|
@ -358,9 +358,12 @@ namespace vcg{
|
||||||
|
|
||||||
virtual const char *Info(MeshType &m)
|
virtual const char *Info(MeshType &m)
|
||||||
{
|
{
|
||||||
static char buf[60];
|
static std::string msg;
|
||||||
sprintf(buf,"(%d - %d) %g\n", hp->HVp()-&m.vert[0], hp->HNp()->HNp()->HVp()-&m.vert[0], -_priority);
|
msg =
|
||||||
return buf;
|
"(" + std::to_string(hp->HVp()-&m.vert[0]) +
|
||||||
|
" - " + std::to_string(hp->HNp()->HNp()->HVp()-&m.vert[0]) +
|
||||||
|
") " + std::to_string(-_priority) + "\n";
|
||||||
|
return msg.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
||||||
|
|
@ -115,9 +115,12 @@ public:
|
||||||
|
|
||||||
virtual const char *Info(TriMeshType &m) {
|
virtual const char *Info(TriMeshType &m) {
|
||||||
mt = &m;
|
mt = &m;
|
||||||
static char buf[60];
|
static std::string msg;
|
||||||
sprintf(buf,"%i -> %i %g\n", int(pos.V(0)-&m.vert[0]), int(pos.V(1)-&m.vert[0]),-_priority);
|
msg =
|
||||||
return buf;
|
std::to_string(int(pos.V(0)-&m.vert[0])) + " -> " +
|
||||||
|
std::to_string(int(pos.V(1)-&m.vert[0])) +
|
||||||
|
" " + std::to_string(-_priority) + "\n";
|
||||||
|
return msg.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void Execute(TriMeshType &m, BaseParameterClass *)
|
inline void Execute(TriMeshType &m, BaseParameterClass *)
|
||||||
|
|
|
||||||
|
|
@ -283,9 +283,12 @@ public:
|
||||||
*/
|
*/
|
||||||
const char* Info(TRIMESH_TYPE &m)
|
const char* Info(TRIMESH_TYPE &m)
|
||||||
{
|
{
|
||||||
static char dump[60];
|
static std::string msg;
|
||||||
sprintf(dump,"%zu -> %zu %g\n", tri::Index(m,_pos.F()->V(0)), tri::Index(m,_pos.F()->V(1)),-_priority);
|
msg =
|
||||||
return dump;
|
std::to_string(tri::Index(m,_pos.F()->V(0))) + " -> " +
|
||||||
|
std::to_string(tri::Index(m,_pos.F()->V(1))) +
|
||||||
|
" " + std::to_string(-_priority) + "\n";
|
||||||
|
return msg.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue