48 uint ns=initmesh.vertex().size();
62 for (
uint l=0; l<ns; l++)
64 if (tex[0].item(l)==value)
65 initMap.
item(l)=(short) 0;
66 else initMap.
item(l)=(short) -1;
68 initMap.
item(dep)=(short) 100;
71 std::map<uint,float> res;
73 for (
uint l=0; l<ns; l++)
75 res[l]=(float) distanceMap[0].item(l);
82 uint j, inext, iprevious=i;
84 result[0].
item(i)=(Val) value;
93 std::set<uint> vois=neigh[i];
94 std::set<uint>::iterator itVois=vois.begin();
96 for (; itVois != vois.end(); ++itVois)
99 if ((tex[0].item(j)==value) && (j != iprevious))
103 inext=j; distmin=res[j];
107 debugTex[0].
item(inext)=value*2;
110 std::cerr <<
"ShortestPath->GraphPath<Val>::process : problem. There is no path between start and end included in the provided set" << std::endl;
112 debugTex[0].
item(dep)=value*3;
113 debugTex[0].
item(arr)=value*3;
114 debugW.
write(debugTex);
118 longueur+=(initmesh.vertex()[i] - initmesh.vertex()[inext]).norm();
119 iprevious=i; i=inext;
120 result[0].
item(i)=(Val) value;
const T & item(int n) const
const T & item(int n) const
Texture< float > MeshDistance(const AimsSurface< 3, Void > &mesh, const Texture< T > &inittex, bool allowUnreached, float max_dist=FLT_MAX)