Esempio n. 1
0
        template <typename VertexInputIterator> FaceHandle addFace(VertexInputIterator begin, VertexInputIterator end)
        {
          FaceHandle ref = builder->begin_facet();

          for (VertexInputIterator vi = begin; vi != end; ++vi)
          {
            typename VertexIndexMap::const_iterator existing = vertex_indices->find(&(**vi));
            if (existing != vertex_indices->end())
              builder->add_vertex_to_facet(existing->second);
            else
              throw Error("IncrementalCGALMeshBuilder: Vertex reference cannot be mapped to a known index");
          }

          builder->end_facet();
          if (builder->error()) throw Error("IncrementalCGALMeshBuilder: Error adding vertex");

          return ref;
        }