Mercurial > hg > wabletios
diff scanpath.mm @ 9:0e03760cf2d9
save preset stuff, not quite there
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Tue, 14 May 2013 18:05:08 +0100 |
parents | 4ea605899aca |
children | 426d645d8e69 |
line wrap: on
line diff
--- a/scanpath.mm Tue May 14 10:34:32 2013 +0100 +++ b/scanpath.mm Tue May 14 18:05:08 2013 +0100 @@ -410,8 +410,13 @@ Json::Value ScanPath::convertToJsonForSaving(){ Json::Value jscanpath; - jscanpath["numElements"] = numElements; - // shiit. pointers mean nothing. the lups won't know which index they are. + + for(int i=0;i<pathElements.size();i++){ + //scanPath.addElement(&lumps[scanPathElements[i]["lumpNo"].asInt()], &springs[scanPathElements[i]["springNo"].asInt()]); + jscanpath[i]["lumpNo"] = pathElements[i].eLump->myIndexInMesh; + jscanpath[i]["springNo"] = pathElements[i].eSpring->myIndexInMesh; + } + return jscanpath; }