53 double max = -FLT_MIN;
59 for (
auto v_it : _mesh.vertices()) {
61 max = std::max( _mesh.property(_texProp,v_it) , max);
62 min = std::min( _mesh.property(_texProp,v_it) , min);
67 if ( !_mesh.has_vertex_texcoords2D() )
68 _mesh.request_vertex_texcoords2D();
72 for (
auto v_it : _mesh.vertices()) {
74 double value = _mesh.property(_texProp, v_it);
80 _mesh.set_texcoord2D( v_it,
ACG::Vec2f(
float(value),
float(value) ) );
88 double max = -FLT_MIN;
93 for (
auto h_it : _mesh.halfedges()) {
95 max = std::max( _mesh.property(_texProp,h_it) , max);
96 min = std::min( _mesh.property(_texProp,h_it) , min);
100 if ( !_mesh.has_halfedge_texcoords2D() )
101 _mesh.request_halfedge_texcoords2D();
105 for (
auto h_it : _mesh.halfedges()) {
108 double value = _mesh.property(_texProp, h_it);
114 _mesh.set_texcoord2D( h_it,
ACG::Vec2f(
float(value),
float(value) ) );
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.
double transform(const double _input) const
Modify given values based on the specified parameters given to the constructor.
TexParameters parameters
Parameters of the texture.