44 #define FILEOFFPLUGIN_C 46 #include <OpenMesh/Core/Utils/color_cast.hh> 55 template <
class MeshT>
59 if (_mesh.has_vertex_texcoords2D()) {
62 if (!_mesh.get_property_handle(oldVertexCoords,
"Original Per Vertex Texture Coords"))
63 _mesh.add_property(oldVertexCoords,
"Original Per Vertex Texture Coords");
65 for (
typename MeshT::VertexIter v_it = _mesh.vertices_begin(); v_it != _mesh.vertices_end(); ++v_it)
66 _mesh.property(oldVertexCoords, *v_it) = _mesh.texcoord2D(*v_it);
71 if (_mesh.has_halfedge_texcoords2D()) {
74 if (!_mesh.get_property_handle(oldHalfedgeCoords,
"Original Per Face Texture Coords"))
75 _mesh.add_property(oldHalfedgeCoords,
"Original Per Face Texture Coords");
77 for (
typename MeshT::HalfedgeIter he_it = _mesh.halfedges_begin(); he_it != _mesh.halfedges_end(); ++he_it)
78 _mesh.property(oldHalfedgeCoords, *he_it) = _mesh.texcoord2D(*he_it);
void backupTextureCoordinates(MeshT &_mesh)
creates a backup of the original per vertex/face texture coordinates