예제 #1
0
void
init_strips(const BMESH &mesh)
{
//   VIEWptr view = new VIEWsimp;
//   VIEW::push(view);

   ((BMESH &) mesh).make_patch_if_needed();
   for (int p = 0; p < mesh.patches().num(); p++) {
      mesh.patches()[p]->build_tri_strips();
   }
//   VIEW::pop();
}
예제 #2
0
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;
}
예제 #3
0
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;
}