- File:
-
- 1 edited
-
src/Actions/WorldAction/CenterOnEdgeAction.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/WorldAction/CenterOnEdgeAction.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 #include " Matrix.hpp"16 #include "LinearAlgebra/Matrix.hpp" 17 17 18 18 #include <iostream> … … 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 … … 39 39 }; 40 40 41 Dialog* WorldCenterOnEdgeAction:: createDialog() {42 Dialog *dialog = UIFactory::getInstance().makeDialog();41 Dialog* WorldCenterOnEdgeAction::fillDialog(Dialog *dialog) { 42 ASSERT(dialog,"No Dialog given when filling action dialog"); 43 43 44 44 dialog->queryEmpty(NAME, ValueStorage::getInstance().getDescription(NAME)); … … 55 55 ASSERT(AllAtoms.size() > 0, "For CenteronEdge atoms must be present."); 56 56 vector<atom *>::iterator AtomRunner = AllAtoms.begin(); 57 Min = (*AtomRunner)-> getPosition();58 Max = (*AtomRunner)-> getPosition();57 Min = (*AtomRunner)->x; 58 Max = (*AtomRunner)->x; 59 59 for (; AtomRunner != AllAtoms.end(); ++AtomRunner) { 60 60 for (int i=0;i<NDIM;i++) { 61 if ((*AtomRunner)-> at(i)> Max[i])62 Max[i] = (*AtomRunner)-> at(i);63 if ((*AtomRunner)-> at(i)< Min[i])64 Min[i] = (*AtomRunner)-> at(i);61 if ((*AtomRunner)->x[i] > Max[i]) 62 Max[i] = (*AtomRunner)->x[i]; 63 if ((*AtomRunner)->x[i] < Min[i]) 64 Min[i] = (*AtomRunner)->x[i]; 65 65 } 66 66 } … … 75 75 // translate all atoms, such that Min is aty (0,0,0) 76 76 for (vector<atom*>::iterator AtomRunner = AllAtoms.begin(); AtomRunner != AllAtoms.end(); ++AtomRunner) 77 *(*AtomRunner)-= Min;77 (*AtomRunner)->x -= Min; 78 78 79 79 return Action::success;
Note:
See TracChangeset
for help on using the changeset viewer.
