added fucntion Save4ROSYFace

This commit is contained in:
Nico Pietroni 2013-01-22 10:04:28 +00:00
parent 4124b595f7
commit c2554e5236
1 changed files with 19 additions and 0 deletions

View File

@ -60,6 +60,25 @@ public:
fclose(f);
}
///Save a 4 rosy format file as used by
///Interactive Visualization of Rotational Symmetry Fields on Surfaces
///Jonathan Palacios and Eugene Zhang
static void Save4ROSYFace(MeshType &mesh,
const char *path)
{
FILE *f = fopen(path,"wt");
fprintf(f,"%d\n",mesh.vn);
fprintf(f,"4\n");
for (unsigned int i=0;i<mesh.face.size();i++)
{
float dirX=(float)mesh.face[i].PD1().X();
float dirY=(float)mesh.face[i].PD1().Y();
float dirZ=(float)mesh.face[i].PD1().Z();
fprintf(f,"%f %f %f \n",dirX,dirY,dirZ);
}
fclose(f);
}
}; // end class