Commit 83d2721446b03d376e70514014777e5d720e4e27

Authored by Pavel Govyadinov
1 parent 1a456186

fixed the bug where the template-sampling was looping around

Showing 1 changed file with 5 additions and 5 deletions   Show diff stats
gl/gl_spider.h
... ... @@ -133,7 +133,7 @@ class gl_spider : public virtual gl_texture<T>
133 133 texID = id;
134 134 GenerateFBO(800,400);
135 135 // Update();
136   - generateVectorField(direction, 75.0);
  136 + generateVectorField(direction, 25.0);
137 137 }
138 138  
139 139 void
... ... @@ -358,7 +358,7 @@ class gl_spider : public virtual gl_texture<T>
358 358 void
359 359 UpdateBuffer(float v_x, float v_y, float len)
360 360 {
361   - std::cout << v_x << "," << v_y << std::endl;
  361 + //std::cout << v_x << "," << v_y << std::endl;
362 362 //float len = dim;
363 363 stim::vec<float>p1;
364 364 stim::vec<float>p2;
... ... @@ -470,8 +470,8 @@ class gl_spider : public virtual gl_texture&lt;T&gt;
470 470 float len = 4.0/(2.0*Dim+1.0);
471 471 float t0 = M_PI/2;
472 472 float p0 = M_PI/3;
473   - float dt = 2.0*t0/Dim;
474   - float dp = 2.0*p0/Dim;
  473 + float dt = t0/Dim;
  474 + float dp = p0/Dim;
475 475 for(int i = -dim; i <= dim; i++){
476 476 for(int j = -dim; j <= dim; j++){
477 477 //field[i+dim][j+dim][0] = d[0];
... ... @@ -481,7 +481,7 @@ class gl_spider : public virtual gl_texture&lt;T&gt;
481 481 temp[1] = d_s[1]+dt*i;
482 482 temp[2] = d_s[2]+dp*j;
483 483 temp = toCartesian(temp);
484   - std::cout << i <<"," << j << std::endl;
  484 + //std::cout << i <<"," << j << std::endl;
485 485 Update(x_0+2.0*(i+dim)*len, y_0+(j+dim)*len, temp, len);
486 486 }
487 487 }
... ...