Commit 17647f6e60a911ccd289e329fa72e84d6bbb7567
1 parent
b1fbc39c
moved the functions getIndex, strObj to the relevant file obj.h
Showing
1 changed file
with
19 additions
and
46 deletions
Show diff stats
stim/visualization/fiber.h
... | ... | @@ -133,32 +133,32 @@ public: |
133 | 133 | gen_kdtree(); |
134 | 134 | } |
135 | 135 | |
136 | - /// This constructor takes a list of points and radii | |
137 | - fiber(std::list< stim::vec< T > > pos, std::list< T > radii){ | |
136 | + ///// This constructor takes a list of points and radii | |
137 | + //fiber(std::list< stim::vec< T > > pos, std::list< T > radii){ | |
138 | 138 | |
139 | - init(pos.size()); //initialize the array size | |
139 | + // init(pos.size()); //initialize the array size | |
140 | 140 | |
141 | - //create an iterator for each list | |
142 | - typename std::list< stim::vec< T > >::iterator pi = pos.begin(); | |
143 | - typename std::list< T >::iterator ri = radii.begin(); | |
141 | + // //create an iterator for each list | |
142 | + // typename std::list< stim::vec< T > >::iterator pi = pos.begin(); | |
143 | + // typename std::list< T >::iterator ri = radii.begin(); | |
144 | 144 | |
145 | - //create a counter for indexing into the fiber array | |
146 | - unsigned int i = 0; | |
145 | + // //create a counter for indexing into the fiber array | |
146 | + // unsigned int i = 0; | |
147 | 147 | |
148 | - //for each point, set the position and radius | |
149 | - for(pi = pos.begin(), ri = radii.begin(); pi != pos.end(); pi++, ri++){ | |
148 | + // //for each point, set the position and radius | |
149 | + // for(pi = pos.begin(), ri = radii.begin(); pi != pos.end(); pi++, ri++){ | |
150 | 150 | |
151 | - //set the centerline position | |
152 | - for(unsigned int d = 0; d < 3; d++) | |
153 | - c[i][d] = (double) (*pi)[d]; | |
154 | - | |
155 | - r[i] = *ri; //set the radius | |
156 | - i++; //increment the array index | |
157 | - } | |
151 | + // //set the centerline position | |
152 | + // for(unsigned int d = 0; d < 3; d++) | |
153 | + // c[i][d] = (double) (*pi)[d]; | |
154 | + // | |
155 | + // r[i] = *ri; //set the radius | |
156 | + // i++; //increment the array index | |
157 | + // } | |
158 | 158 | |
159 | - gen_kdtree(); //generate a kd tree | |
159 | + // gen_kdtree(); //generate a kd tree | |
160 | 160 | |
161 | - } | |
161 | + //} | |
162 | 162 | |
163 | 163 | /// constructor takes an array of points and radii |
164 | 164 | // this function is used when the radii are represented as a stim::vec, |
... | ... | @@ -403,33 +403,6 @@ public: |
403 | 403 | |
404 | 404 | return ss.str(); |
405 | 405 | } |
406 | - /// get index of a node on a fiber | |
407 | - // by matching the node on fiber to already set vertices (both strings) | |
408 | - int getIndexes(std::string* input, std::string searched, int sizeV) { | |
409 | - int result = 0; | |
410 | - for (int i = 0; i < sizeV; i++) { | |
411 | - if (input[i] == searched) { | |
412 | - result = i + 1; | |
413 | - } | |
414 | - } | |
415 | - | |
416 | - return result; | |
417 | - } | |
418 | - // strObj returns a string of fiber indices corresponding to position | |
419 | - std::string | |
420 | - strObj(std::string* strArray, int sizeV) | |
421 | - { | |
422 | - std::stringstream ss; | |
423 | - std::stringstream oss; | |
424 | - for(unsigned int i = 0; i < N; i++){ | |
425 | - ss.str(std::string()); | |
426 | - for(unsigned int d = 0; d < 3; d++){ | |
427 | - ss<<c[i][d]; | |
428 | - } | |
429 | - oss<<getIndexes(strArray, ss.str(), sizeV)<<" "; | |
430 | - } | |
431 | - return oss.str(); | |
432 | - } | |
433 | 406 | /// Returns the number of centerline points in the fiber |
434 | 407 | unsigned int n_pts(){ |
435 | 408 | return N; | ... | ... |