2 |
|
#include "AtomVisitor.hpp" |
3 |
|
#include "DirectionalAtom.hpp" |
4 |
|
#include "MatVec3.h" |
5 |
+ |
#include "RigidBody.hpp" |
6 |
|
|
7 |
+ |
void BaseAtomVisitor::visit(RigidBody* rb){ |
8 |
+ |
//vector<Atom*> myAtoms; |
9 |
+ |
//vector<Atom*>::iterator atomIter; |
10 |
+ |
|
11 |
+ |
//myAtoms = rb->getAtoms(); |
12 |
+ |
|
13 |
+ |
//for(atomIter = myAtoms.begin(); atomIter != myAtoms.end(); ++atomIter) |
14 |
+ |
// (*atomIter)->accept(this); |
15 |
+ |
} |
16 |
+ |
|
17 |
|
void BaseAtomVisitor::setVisited(Atom* atom){ |
18 |
|
GenericData* data; |
19 |
|
data = atom->getProperty("VISITED"); |
149 |
|
return; |
150 |
|
|
151 |
|
atomInfo =new AtomInfo; |
152 |
+ |
|
153 |
+ |
atomData = new AtomData; |
154 |
+ |
atomData->setID("ATOMDATA"); |
155 |
|
|
156 |
|
atom->getPos(pos); |
157 |
|
atomInfo->AtomType = atom->getType(); |
162 |
|
atomInfo->dipole[1] = 0.0; |
163 |
|
atomInfo->dipole[2] = 0.0; |
164 |
|
|
165 |
< |
atomData = new AtomData; |
166 |
< |
atomData->setID("ATOMDATA"); |
165 |
> |
|
166 |
> |
atomData->addAtomInfo(atomInfo); |
167 |
> |
|
168 |
|
atom->addProperty(atomData); |
169 |
|
|
170 |
|
setVisited(atom); |
181 |
|
datom->getPos(pos); |
182 |
|
datom->getU(u); |
183 |
|
|
184 |
+ |
atomData = new AtomData; |
185 |
+ |
atomData->setID("ATOMDATA"); |
186 |
|
atomInfo =new AtomInfo; |
187 |
|
|
188 |
|
atomInfo->AtomType = datom->getType(); |
193 |
|
atomInfo->dipole[1] = u[1]; |
194 |
|
atomInfo->dipole[2] = u[2]; |
195 |
|
|
196 |
< |
atomData = new AtomData; |
197 |
< |
atomData->setID("ATOMDATA"); |
196 |
> |
atomData->addAtomInfo(atomInfo); |
197 |
> |
|
198 |
|
datom->addProperty(atomData); |
199 |
|
|
200 |
|
setVisited(datom); |