50 #define FILEOFFPLUGIN_C 52 #include <OpenMesh/Core/Utils/color_cast.hh> 61 template <
class MeshT>
65 if (_mesh.has_vertex_texcoords2D()) {
68 if (!_mesh.get_property_handle(oldVertexCoords,
"Original Per Vertex Texture Coords"))
69 _mesh.add_property(oldVertexCoords,
"Original Per Vertex Texture Coords");
71 for (
typename MeshT::VertexIter v_it = _mesh.vertices_begin(); v_it != _mesh.vertices_end(); ++v_it)
72 _mesh.property(oldVertexCoords, *v_it) = _mesh.texcoord2D(*v_it);
77 if (_mesh.has_halfedge_texcoords2D()) {
80 if (!_mesh.get_property_handle(oldHalfedgeCoords,
"Original Per Face Texture Coords"))
81 _mesh.add_property(oldHalfedgeCoords,
"Original Per Face Texture Coords");
83 for (
typename MeshT::HalfedgeIter he_it = _mesh.halfedges_begin(); he_it != _mesh.halfedges_end(); ++he_it)
84 _mesh.property(oldHalfedgeCoords, *he_it) = _mesh.texcoord2D(*he_it);
void backupTextureCoordinates(MeshT &_mesh)
creates a backup of the original per vertex/face texture coordinates