- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/WorldAction/AddEmptyBoundaryAction.cpp
rd74077 r952f38 11 11 #include "Actions/ActionRegistry.hpp" 12 12 #include "atom.hpp" 13 #include " log.hpp"14 #include " vector.hpp"13 #include "Helpers/Log.hpp" 14 #include "LinearAlgebra/Vector.hpp" 15 15 #include "World.hpp" 16 16 … … 23 23 #include "UIElements/UIFactory.hpp" 24 24 #include "UIElements/Dialog.hpp" 25 #include " UIElements/ValueStorage.hpp"25 #include "Actions/ValueStorage.hpp" 26 26 #include "Helpers/Assert.hpp" 27 27 … … 40 40 }; 41 41 42 Dialog* WorldAddEmptyBoundaryAction:: createDialog() {43 Dialog *dialog = UIFactory::getInstance().makeDialog();42 Dialog* WorldAddEmptyBoundaryAction::fillDialog(Dialog *dialog) { 43 ASSERT(dialog,"No Dialog given when filling action dialog"); 44 44 45 45 dialog->queryVector(NAME, false, ValueStorage::getInstance().getDescription(NAME)); … … 60 60 ASSERT(AllAtoms.size() > 0, "There must be atoms present for AddingEmptyBoundary."); 61 61 vector<atom *>::iterator AtomRunner = AllAtoms.begin(); 62 Min = (*AtomRunner)-> getPosition();63 Max = (*AtomRunner)-> getPosition();62 Min = (*AtomRunner)->x; 63 Max = (*AtomRunner)->x; 64 64 for (; AtomRunner != AllAtoms.end(); ++AtomRunner) { 65 65 for (int i=0;i<NDIM;i++) { 66 if ((*AtomRunner)-> at(i)> Max[i])67 Max[i] = (*AtomRunner)-> at(i);68 if ((*AtomRunner)-> at(i)< Min[i])69 Min[i] = (*AtomRunner)-> at(i);66 if ((*AtomRunner)->x[i] > Max[i]) 67 Max[i] = (*AtomRunner)->x[i]; 68 if ((*AtomRunner)->x[i] < Min[i]) 69 Min[i] = (*AtomRunner)->x[i]; 70 70 } 71 71 } … … 84 84 AtomRunner = AllAtoms.begin(); 85 85 for (; AtomRunner != AllAtoms.end(); ++AtomRunner) 86 *(*AtomRunner)-= Min - boundary;86 (*AtomRunner)->x -= Min - boundary; 87 87 return Action::success; 88 88 }
Note:
See TracChangeset
for help on using the changeset viewer.
