Commit 47fe6300b1fd649bfb6d3133d413a43aa22a6527

Authored by Pavel Govyadinov
1 parent a36c3850

fixed an accidental delition of necessary code.

Showing 2 changed files with 13 additions and 2 deletions   Show diff stats
stim/gl/gl_spider.h
... ... @@ -134,6 +134,8 @@ class gl_spider // : public virtual gl_texture<T>
134 134 stim::cuda::cuda_texture t_mag; //cuda_texture object used as an interface between OpenGL and cuda for size vectors.
135 135  
136 136  
  137 + int iter;
  138 +
137 139 //--------------------------------------------------------------------------//
138 140 //-------------------------------PRIVATE METHODS----------------------------//
139 141 //--------------------------------------------------------------------------//
... ... @@ -268,6 +270,7 @@ class gl_spider // : public virtual gl_texture<T>
268 270 stim::vec3<float> v = cyl.surf(pval, result[i][0]); ///find the coordinates of the point at pval on the surface in tissue space.
269 271 stim::vec3<float> di = cyl.p(pval); ///find the coord of v in tissue space projected on the centerline.
270 272 float rad = cyl.r(pval); ///find the radius at the pvalue's location
  273 + std::cout << v << rad << std::endl;
271 274 if(
272 275 !(v[0] > size[0] || v[1] > size[1]
273 276 || v[2] > size[2] || v[0] < 0
... ... @@ -743,6 +746,7 @@ class gl_spider // : public virtual gl_texture&lt;T&gt;
743 746 numSamples = samples;
744 747 numSamplesPos = samplespos;
745 748 numSamplesMag = samplesmag;
  749 + iter = 0;
746 750 }
747 751  
748 752 ///Position constructor: floats.
... ... @@ -766,6 +770,7 @@ class gl_spider // : public virtual gl_texture&lt;T&gt;
766 770 numSamples = numsamples;
767 771 numSamplesPos = numsamplespos;
768 772 numSamplesMag = numsamplesmag;
  773 + iter = 0;
769 774 }
770 775  
771 776 ///Position constructor: vecs of floats.
... ... @@ -784,6 +789,7 @@ class gl_spider // : public virtual gl_texture&lt;T&gt;
784 789 numSamples = samples;
785 790 numSamplesPos = samplesPos;
786 791 numSamplesMag = samplesMag;
  792 + iter = 0;
787 793 }
788 794  
789 795 ///destructor
... ... @@ -817,6 +823,9 @@ class gl_spider // : public virtual gl_texture&lt;T&gt;
817 823 network_time = 0;
818 824 hit_time = 0;
819 825 #endif
  826 +#ifdef DEBUG
  827 + iter = 0;
  828 +#endif
820 829 stepsize = 3.0;
821 830 n_pixels = 16.0;
822 831  
... ... @@ -1563,7 +1572,7 @@ class gl_spider // : public virtual gl_texture&lt;T&gt;
1563 1572 float smag = getMagnitude();
1564 1573 stim::vec3<float> sdir = getDirection();
1565 1574  
1566   - Bind();
  1575 +// Bind();
1567 1576 // sk.Begin(stim::OBJ_LINE);
1568 1577  
1569 1578  
... ... @@ -1631,7 +1640,7 @@ class gl_spider // : public virtual gl_texture&lt;T&gt;
1631 1640 else {
1632 1641 cL.push_back(stim::vec3<float>(p[0], p[1],p[2]));
1633 1642 cM.push_back(m);
1634   - Unbind();
  1643 +// Unbind();
1635 1644 CHECK_OPENGL_ERROR
1636 1645 }
1637 1646 }
... ...
stim/visualization/cylinder.h
... ... @@ -223,6 +223,8 @@ class cylinder
223 223 std::vector<stim::vec<T> > temp;
224 224 stim::vec<T> zero(0.0,0.0);
225 225 temp.resize(inM.size(), zero);
  226 + for(int i = 0; i < inM.size(); i++)
  227 + temp[i][0] = inM[i];
226 228 init(inP, temp);
227 229 }
228 230  
... ...