From 47fe6300b1fd649bfb6d3133d413a43aa22a6527 Mon Sep 17 00:00:00 2001 From: pgovyadi Date: Mon, 29 Aug 2016 18:31:57 -0500 Subject: [PATCH] fixed an accidental delition of necessary code. --- stim/gl/gl_spider.h | 13 +++++++++++-- stim/visualization/cylinder.h | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/stim/gl/gl_spider.h b/stim/gl/gl_spider.h index 53242a4..f3a007f 100644 --- a/stim/gl/gl_spider.h +++ b/stim/gl/gl_spider.h @@ -134,6 +134,8 @@ class gl_spider // : public virtual gl_texture stim::cuda::cuda_texture t_mag; //cuda_texture object used as an interface between OpenGL and cuda for size vectors. + int iter; + //--------------------------------------------------------------------------// //-------------------------------PRIVATE METHODS----------------------------// //--------------------------------------------------------------------------// @@ -268,6 +270,7 @@ class gl_spider // : public virtual gl_texture stim::vec3 v = cyl.surf(pval, result[i][0]); ///find the coordinates of the point at pval on the surface in tissue space. stim::vec3 di = cyl.p(pval); ///find the coord of v in tissue space projected on the centerline. float rad = cyl.r(pval); ///find the radius at the pvalue's location + std::cout << v << rad << std::endl; if( !(v[0] > size[0] || v[1] > size[1] || v[2] > size[2] || v[0] < 0 @@ -743,6 +746,7 @@ class gl_spider // : public virtual gl_texture numSamples = samples; numSamplesPos = samplespos; numSamplesMag = samplesmag; + iter = 0; } ///Position constructor: floats. @@ -766,6 +770,7 @@ class gl_spider // : public virtual gl_texture numSamples = numsamples; numSamplesPos = numsamplespos; numSamplesMag = numsamplesmag; + iter = 0; } ///Position constructor: vecs of floats. @@ -784,6 +789,7 @@ class gl_spider // : public virtual gl_texture numSamples = samples; numSamplesPos = samplesPos; numSamplesMag = samplesMag; + iter = 0; } ///destructor @@ -817,6 +823,9 @@ class gl_spider // : public virtual gl_texture network_time = 0; hit_time = 0; #endif +#ifdef DEBUG + iter = 0; +#endif stepsize = 3.0; n_pixels = 16.0; @@ -1563,7 +1572,7 @@ class gl_spider // : public virtual gl_texture float smag = getMagnitude(); stim::vec3 sdir = getDirection(); - Bind(); +// Bind(); // sk.Begin(stim::OBJ_LINE); @@ -1631,7 +1640,7 @@ class gl_spider // : public virtual gl_texture else { cL.push_back(stim::vec3(p[0], p[1],p[2])); cM.push_back(m); - Unbind(); +// Unbind(); CHECK_OPENGL_ERROR } } diff --git a/stim/visualization/cylinder.h b/stim/visualization/cylinder.h index 3d5bc64..c5d3a5d 100644 --- a/stim/visualization/cylinder.h +++ b/stim/visualization/cylinder.h @@ -223,6 +223,8 @@ class cylinder std::vector > temp; stim::vec zero(0.0,0.0); temp.resize(inM.size(), zero); + for(int i = 0; i < inM.size(); i++) + temp[i][0] = inM[i]; init(inP, temp); } -- libgit2 0.21.4