Fixed Seam_mesh's intrinsic UV map

This commit is contained in:
Mael Rouxel-Labbé 2017-02-08 11:08:20 +01:00
parent b3dc507db1
commit c51c67fa0c
1 changed files with 6 additions and 10 deletions

View File

@ -86,20 +86,16 @@ public:
// return map[target(hd, mesh.mesh())]; // return map[target(hd, mesh.mesh())];
//} //}
inline friend reference get(const Self& pm, key_type k) inline friend reference get(const Self& pm, key_type vd)
{ {
return get(pm.map, k); typename boost::graph_traits<TM>::halfedge_descriptor hd = vd;
return get(pm.map, target(hd, pm.mesh.mesh()));
} }
inline friend void put(const Self& pm, key_type k, const value_type& v) inline friend void put(const Self& pm, key_type vd, const value_type& uv)
{ {
typedef typename boost::graph_traits<typename Self::Mesh>::halfedge_descriptor halfedge_descriptor; typename boost::graph_traits<TM>::halfedge_descriptor hd = vd;
BOOST_FOREACH(halfedge_descriptor hd, put(pm.map, target(hd, pm.mesh.mesh()), uv);
halfedges_around_target(halfedge(k, pm.mesh), pm.mesh)){
if(!hd.seam){
put(pm.map, target(hd, pm.mesh), v);
}
}
} }
private: private: