Face Deleted Check Added.

This commit is contained in:
Paolo Cignoni 2005-03-02 11:57:39 +00:00
parent 6de8c98656
commit 7cd3979a16
1 changed files with 19 additions and 19 deletions

View File

@ -53,30 +53,30 @@ public:
SaveMeshType::FaceIterator fi;
for(fi=m.face.begin(); fi!=m.face.end(); ++fi)
{
SaveMeshType::CoordType v0 = (*fi).V(0)->P();
SaveMeshType::CoordType v1 = (*fi).V(1)->P();
SaveMeshType::CoordType v2 = (*fi).V(2)->P();
fprintf(o,"0\n"); fprintf(o,"3DFACE\n"); fprintf(o,"8\n"); fprintf(o,"0\n");
fprintf(o,"10\n"); fprintf(o,"%f\n", v0[0]); //X
fprintf(o,"20\n"); fprintf(o,"%f\n", v0[1]); //Y
fprintf(o,"30\n"); fprintf(o,"%f\n", v0[2]); //Z
if (!fi->IsD())
{
SaveMeshType::CoordType v0 = (*fi).V(0)->P();
SaveMeshType::CoordType v1 = (*fi).V(1)->P();
SaveMeshType::CoordType v2 = (*fi).V(2)->P();
fprintf(o,"0\n"); fprintf(o,"3DFACE\n"); fprintf(o,"8\n"); fprintf(o,"0\n");
fprintf(o,"10\n"); fprintf(o,"%f\n", v0[0]); //X
fprintf(o,"20\n"); fprintf(o,"%f\n", v0[1]); //Y
fprintf(o,"30\n"); fprintf(o,"%f\n", v0[2]); //Z
fprintf(o,"11\n"); fprintf(o,"%f\n", v1[0]); //X
fprintf(o,"21\n"); fprintf(o,"%f\n", v1[1]); //Y
fprintf(o,"31\n"); fprintf(o,"%f\n", v1[2]); //Z
fprintf(o,"12\n"); fprintf(o,"%f\n", v2[0]); //X
fprintf(o,"22\n"); fprintf(o,"%f\n", v2[1]); //Y
fprintf(o,"32\n"); fprintf(o,"%f\n", v2[2]); //Z
fprintf(o,"13\n"); fprintf(o,"%f\n", v2[0]); //X
fprintf(o,"23\n"); fprintf(o,"%f\n", v2[1]); //Y
fprintf(o,"33\n"); fprintf(o,"%f\n", v2[2]); //Z
fprintf(o,"11\n"); fprintf(o,"%f\n", v1[0]); //X
fprintf(o,"21\n"); fprintf(o,"%f\n", v1[1]); //Y
fprintf(o,"31\n"); fprintf(o,"%f\n", v1[2]); //Z
fprintf(o,"12\n"); fprintf(o,"%f\n", v2[0]); //X
fprintf(o,"22\n"); fprintf(o,"%f\n", v2[1]); //Y
fprintf(o,"32\n"); fprintf(o,"%f\n", v2[2]); //Z
fprintf(o,"13\n"); fprintf(o,"%f\n", v2[0]); //X
fprintf(o,"23\n"); fprintf(o,"%f\n", v2[1]); //Y
fprintf(o,"33\n"); fprintf(o,"%f\n", v2[2]); //Z
}
}
fprintf(o,"0\n");
fprintf(o,"ENDSEC\n");
fprintf(o,"0\n");