Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/MoleculeAction/RotateAroundOriginByAngleAction.cpp

    r4a06d6 r2204b0  
    5252{}
    5353
    54 void MoleculeRotateAroundOriginByAngle(const Vector &Axis, double angle) {
     54void MoleculeRotateAroundOriginByAngle(double angle) {
    5555  ValueStorage::getInstance().setCurrentValue(MoleculeRotateAroundOriginByAngleAction::NAME, angle);
    56   ValueStorage::getInstance().setCurrentValue("position", Axis);
    5756  ActionRegistry::getInstance().getActionByName(MoleculeRotateAroundOriginByAngleAction::NAME)->call(Action::NonInteractive);
    5857};
     
    8382  alpha *= M_PI/180.;
    8483
    85   // Creation Line that is the rotation axis
    86   Line RotationAxis(Vector(0.,0.,0.), Axis);
    87 
    8884  DoLog(0) && (Log() << Verbose(0) << "Rotate around origin by " << alpha << " radian, axis from origin to " << Axis << "." << endl);
    8985  for (World::MoleculeSelectionIterator iter = World::getInstance().beginMoleculeSelection(); iter != World::getInstance().endMoleculeSelection(); ++iter) {
    9086    mol = iter->second;
    9187
     88    // Creation Line that is the rotation axis
     89    Line RotationAxis(Vector(0.,0.,0.), Axis);
     90
    9291    for (molecule::iterator iter = mol->begin(); iter != mol->end(); ++iter) {
    9392      *((*iter)->node) = RotationAxis.rotateVector(*((*iter)->node), alpha);
    9493    }
     94    DoLog(0) && (Log() << Verbose(0) << "done." << endl);
    9595  }
    96   DoLog(0) && (Log() << Verbose(0) << "done." << endl);
    9796  return Action::state_ptr(new MoleculeRotateAroundOriginByAngleState(World::getInstance().getSelectedMolecules(), Axis, alpha));
    9897}
Note: See TracChangeset for help on using the changeset viewer.