void write_normals(const BMESH &mesh, ostream &os) { Formatter out(&os, 77); out.write(" normal ["); IVNormalIterator iter(&out); for (int p = 0; p < mesh.patches().num(); p++) { Patch *patch = mesh.patches()[p]; patch->draw_tri_strips(&iter); } os << "]" << endl; os << " normalBinding PER_FACE" << endl; }
void write_strips(const BMESH &mesh, ostream &os) { const str_ptr intro(" coordIndex ["); Formatter out(&os, 77); out.write(intro); IVTriStripIterator iter(&out); // from Bface::draw_strips() for (int p = 0; p < mesh.patches().num(); p++) { Patch *patch = mesh.patches()[p]; iter.set_left(patch->num_tri_strips()); patch->draw_tri_strips(&iter); // If there are more patches, write out ", " if (p < mesh.patches().num() - 1) os << ", "; } os << "]" << endl; }