Skip to content

Commit

Permalink
Merge pull request #442 from yig/master
Browse files Browse the repository at this point in the history
writeOBJ writes out as many coordinates per vertex as there are columns in V
  • Loading branch information
alecjacobson committed Jan 9, 2017
2 parents 5fd9c42 + b7711b4 commit 36f0b31
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions include/igl/writeOBJ.cpp
Expand Up @@ -39,11 +39,12 @@ IGL_INLINE bool igl::writeOBJ(
// Loop over V
for(int i = 0;i<(int)V.rows();i++)
{
fprintf(obj_file,"v %0.17g %0.17g %0.17g\n",
V(i,0),
V(i,1),
V(i,2)
);
fprintf(obj_file,"v");
for(int j = 0;j<(int)V.cols();++j)
{
fprintf(obj_file," %0.17g", V(i,j));
}
fprintf(obj_file,"\n");
}
bool write_N = CN.rows() >0;

Expand Down

0 comments on commit 36f0b31

Please sign in to comment.