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 | 317 | } |
318 | 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 | 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 | 322 | if( |
322 | 323 | !(v[0] > size[0] || v[1] > size[1] |
323 | 324 | || v[2] > size[2] || v[0] < 0 |
... | ... | @@ -374,7 +375,7 @@ class gl_spider // : public virtual gl_texture<T> |
374 | 375 | ///Stored in a display list. |
375 | 376 | ///uses the default d vector <0,0,1> |
376 | 377 | void |
377 | - genDirectionVectors(float solidAngle = stim::PI/2) | |
378 | + genDirectionVectors(float solidAngle = 3*stim::PI/4) | |
378 | 379 | { |
379 | 380 | |
380 | 381 | //Set up the vectors necessary for Rectangle creation. | ... | ... |
stim/math/vec3.h
... | ... | @@ -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 | 72 | CUDA_CALLABLE vec3<T> cart2sph() const{ |
73 | 73 | vec3<T> sph; |
74 | 74 | sph.ptr[0] = len(); |
... | ... | @@ -236,6 +236,13 @@ public: |
236 | 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 | 246 | //#ifndef __NVCC__ |
240 | 247 | /// Outputs the vector as a string |
241 | 248 | std::string str() const{ | ... | ... |