Commit efb0a2b5c7b2f4f560c8ea9697166fb53f8aca42
Fixed merge conflicts
Showing
2 changed files
with
11 additions
and
3 deletions
Show diff stats
stim/gl/gl_spider.h
@@ -317,7 +317,8 @@ class gl_spider // : public virtual gl_texture<T> | @@ -317,7 +317,8 @@ class gl_spider // : public virtual gl_texture<T> | ||
317 | } | 317 | } |
318 | stim::vec3<float> v = cyl.surf(pval, result[i][0]); ///find the coordinates of the point at pval on the surface in tissue space. | 318 | stim::vec3<float> v = cyl.surf(pval, result[i][0]); ///find the coordinates of the point at pval on the surface in tissue space. |
319 | stim::vec3<float> di = cyl.p(pval); ///find the coord of v in tissue space projected on the centerline. | 319 | stim::vec3<float> di = cyl.p(pval); ///find the coord of v in tissue space projected on the centerline. |
320 | - float rad = cyl.r(pval)/2; ///find the radius at the pvalue's location | 320 | + float rad = cyl.r(pval); ///find the radius at the pvalue's location |
321 | + // float rad = cyl.r(pval)/2; ///find the radius at the pvalue's location | ||
321 | if( | 322 | if( |
322 | !(v[0] > size[0] || v[1] > size[1] | 323 | !(v[0] > size[0] || v[1] > size[1] |
323 | || v[2] > size[2] || v[0] < 0 | 324 | || v[2] > size[2] || v[0] < 0 |
@@ -374,7 +375,7 @@ class gl_spider // : public virtual gl_texture<T> | @@ -374,7 +375,7 @@ class gl_spider // : public virtual gl_texture<T> | ||
374 | ///Stored in a display list. | 375 | ///Stored in a display list. |
375 | ///uses the default d vector <0,0,1> | 376 | ///uses the default d vector <0,0,1> |
376 | void | 377 | void |
377 | - genDirectionVectors(float solidAngle = stim::PI/2) | 378 | + genDirectionVectors(float solidAngle = 3*stim::PI/4) |
378 | { | 379 | { |
379 | 380 | ||
380 | //Set up the vectors necessary for Rectangle creation. | 381 | //Set up the vectors necessary for Rectangle creation. |
stim/math/vec3.h
@@ -68,7 +68,7 @@ public: | @@ -68,7 +68,7 @@ public: | ||
68 | } | 68 | } |
69 | 69 | ||
70 | 70 | ||
71 | - /// Convert the vector from cartesian to spherical coordinates (x, y, z -> r, theta, phi where theta = [0, 2*pi]) | 71 | + /// Convert the vector from cartesian to spherical coordinates (x, y, z -> r, theta, phi where theta = [-PI, PI]) |
72 | CUDA_CALLABLE vec3<T> cart2sph() const{ | 72 | CUDA_CALLABLE vec3<T> cart2sph() const{ |
73 | vec3<T> sph; | 73 | vec3<T> sph; |
74 | sph.ptr[0] = len(); | 74 | sph.ptr[0] = len(); |
@@ -236,6 +236,13 @@ public: | @@ -236,6 +236,13 @@ public: | ||
236 | return result; | 236 | return result; |
237 | } | 237 | } |
238 | 238 | ||
239 | + CUDA_CALLABLE bool operator==(vec3<T> rhs) const{ | ||
240 | + if(rhs[0] == ptr[0] && rhs[1] == ptr[1] && rhs[2] == ptr[2]) | ||
241 | + return true; | ||
242 | + else | ||
243 | + return false; | ||
244 | + } | ||
245 | + | ||
239 | //#ifndef __NVCC__ | 246 | //#ifndef __NVCC__ |
240 | /// Outputs the vector as a string | 247 | /// Outputs the vector as a string |
241 | std::string str() const{ | 248 | std::string str() const{ |