135 vector<int> accomplished;
138 int nFirstNode = nNodeID;
139 TSphereCoord coord = m_pGraph->getNodes()->at(nFirstNode)->getPosition();
140 nodes.push_back(nFirstNode);
148 while (nodes.size() > 0)
151 int nCurrentNode = nodes.front();
153 accomplished.push_back(nCurrentNode);
156 cur_sc = m_pGraph->getNodes()->at(nCurrentNode)->getPosition();
158 float fAngle = Math3d::Angle(ref, cur);
161 if (fAngle > 2.0 * fVariance)
167 fIntensity = evaluateGaussian(fAngle, fAmplitude, fVariance);
173 m_pMap->data[nCurrentNode] = fIntensity;
177 m_pMap->data[nCurrentNode] += fIntensity;
181 m_pMap->data[nCurrentNode] *= fIntensity;
185 if (m_pMap->data[nCurrentNode] < fIntensity)
187 m_pMap->data[nCurrentNode] = fIntensity;
193 printf(
"Illegal operation\n");
198 vector<int>* pAdjacency = m_pGraph->getNodeAdjacency(nCurrentNode);
203 for (
int a = 0; a < int(pAdjacency->size()); a++)
205 nAdjNode = pAdjacency->at(a);
208 bool bNewNode =
true;
210 for (
int c = 0;
c < int(accomplished.size());
c++)
211 if (accomplished.at(
c) == nAdjNode)
216 list<int>::iterator iter = nodes.begin();
218 while (iter != nodes.end())
220 if (*iter == nAdjNode)
231 nodes.push_back(nAdjNode);