- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/MoleculeAction/RotateAroundOriginByAngleAction.cpp
r4a06d6 r2204b0 52 52 {} 53 53 54 void MoleculeRotateAroundOriginByAngle( const Vector &Axis,double angle) {54 void MoleculeRotateAroundOriginByAngle(double angle) { 55 55 ValueStorage::getInstance().setCurrentValue(MoleculeRotateAroundOriginByAngleAction::NAME, angle); 56 ValueStorage::getInstance().setCurrentValue("position", Axis);57 56 ActionRegistry::getInstance().getActionByName(MoleculeRotateAroundOriginByAngleAction::NAME)->call(Action::NonInteractive); 58 57 }; … … 83 82 alpha *= M_PI/180.; 84 83 85 // Creation Line that is the rotation axis86 Line RotationAxis(Vector(0.,0.,0.), Axis);87 88 84 DoLog(0) && (Log() << Verbose(0) << "Rotate around origin by " << alpha << " radian, axis from origin to " << Axis << "." << endl); 89 85 for (World::MoleculeSelectionIterator iter = World::getInstance().beginMoleculeSelection(); iter != World::getInstance().endMoleculeSelection(); ++iter) { 90 86 mol = iter->second; 91 87 88 // Creation Line that is the rotation axis 89 Line RotationAxis(Vector(0.,0.,0.), Axis); 90 92 91 for (molecule::iterator iter = mol->begin(); iter != mol->end(); ++iter) { 93 92 *((*iter)->node) = RotationAxis.rotateVector(*((*iter)->node), alpha); 94 93 } 94 DoLog(0) && (Log() << Verbose(0) << "done." << endl); 95 95 } 96 DoLog(0) && (Log() << Verbose(0) << "done." << endl);97 96 return Action::state_ptr(new MoleculeRotateAroundOriginByAngleState(World::getInstance().getSelectedMolecules(), Axis, alpha)); 98 97 }
Note:
See TracChangeset
for help on using the changeset viewer.