44 #define TEXTURECONTROL_2D_TEXTURE_HANDLING_C 46 #include "TextureControl.hh" 48 template<
typename MeshT >
51 if ( !_mesh.has_vertex_texcoords2D() )
52 _mesh.request_vertex_texcoords2D();
54 for (
typename MeshT::VertexIter v_it = _mesh.vertices_begin(); v_it != _mesh.vertices_end(); ++v_it) {
60 _mesh.set_texcoord2D( *v_it,
ACG::Vec2f(
float(value[0]),
float(value[1]) ) );
64 template<
typename MeshT >
67 if ( !_mesh.has_halfedge_texcoords2D() )
68 _mesh.request_halfedge_texcoords2D();
70 for (
typename MeshT::HalfedgeIter h_it = _mesh.halfedges_begin(); h_it != _mesh.halfedges_end(); ++h_it) {
76 _mesh.set_texcoord2D( *h_it,
ACG::Vec2f(
float(value[0]),
float(value[1]) ) );
void copyTexture(Texture &_texture, MeshT &_mesh, OpenMesh::VPropHandleT< double > _texProp)
Copy the supplied 1D vertex property to both coordinates of the 2D vertex OM texture property...