Commit dc913a735c1841497f5cd027936029cd30cb5b87

Authored by David Mayerich
2 parents d4aa4cf7 11c1b46b

Merge branch 'master' of git.stim.ee.uh.edu:codebase/stimlib

Showing 1 changed file with 7 additions and 3 deletions   Show diff stats
stim/gl/gl_spider.h
... ... @@ -870,7 +870,7 @@ class gl_spider : public virtual gl_texture<T>
870 870 GenerateFBO(16, numSamplesMag*8, mtexbufferID, mfboID);
871 871 GenerateFBO(16, 216, btexbufferID, bfboID);
872 872 setDims(0.6, 0.6, 1.0);
873   - setSize(512.0, 512.0, 426.0);
  873 + setSize(1024.0, 1024.0, 1024.0);
874 874 setMatrix();
875 875 dList = glGenLists(3);
876 876 glListBase(dList);
... ... @@ -1058,6 +1058,7 @@ class gl_spider : public virtual gl_texture<T>
1058 1058 void
1059 1059 setSeedMag(float mag)
1060 1060 {
  1061 + std::cout << "sMag: " << mag << std::endl;
1061 1062 seedsmags.push(mag);
1062 1063 }
1063 1064  
... ... @@ -1070,6 +1071,7 @@ class gl_spider : public virtual gl_texture&lt;T&gt;
1070 1071 void
1071 1072 setSeed(float x, float y, float z)
1072 1073 {
  1074 + std::cout << "sPos: " << x << " " << y << " " << z << std::endl;
1073 1075 seeds.push(stim::vec<float>(x, y, z));
1074 1076 }
1075 1077  
... ... @@ -1080,6 +1082,7 @@ class gl_spider : public virtual gl_texture&lt;T&gt;
1080 1082 void
1081 1083 setSeedVec(float x, float y, float z)
1082 1084 {
  1085 + std::cout << "sDir: " << x << " " << y << " " << z << std::endl;
1083 1086 seedsvecs.push(stim::vec<float>(x, y, z));
1084 1087 }
1085 1088  
... ... @@ -1239,6 +1242,7 @@ class gl_spider : public virtual gl_texture&lt;T&gt;
1239 1242 (std::clock() - start) / (double) CLOCKS_PER_SEC;
1240 1243 num_sampling = num_sampling + 1.0;
1241 1244 #endif
  1245 + std::cout << current_cost << std::endl;
1242 1246 return current_cost;
1243 1247 }
1244 1248  
... ... @@ -1480,7 +1484,7 @@ class gl_spider : public virtual gl_texture&lt;T&gt;
1480 1484 spos[2] = spos[2]-sdir[2]*smag[0]/2.;
1481 1485 int h = selectObject(spos, -sdir, smag[0]);
1482 1486 //did we start with a fiber?
1483   - if(h != -1)
  1487 + if(h != -1 && h < nt.sizeE())
1484 1488 nt.addEdge(ce, cm, h, -1);
1485 1489 else
1486 1490 nt.addEdge(ce, cm, -1, -1);
... ... @@ -1494,7 +1498,7 @@ class gl_spider : public virtual gl_texture&lt;T&gt;
1494 1498 spos[2] = spos[2]-sdir[2]*smag[0]/2.;
1495 1499 int h = selectObject(spos, -sdir, smag[0]);
1496 1500 //did start with a fiber?
1497   - if(h != -1 && h != nt.sizeE()){
  1501 + if(h != -1 && h < nt.sizeE()){
1498 1502 // std::cout << "got here double" << smag.str() << std::endl;
1499 1503 nt.addEdge(ce,cm, h, in.second);
1500 1504 } else { nt.addEdge(ce,cm, -1, -1);}
... ...