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