Ignore:
File:
1 edited

Legend:

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

    r833b15 r26b4d62  
    7474
    7575    // Creation Line that is the rotation axis
    76     const Vector CenterOfGravity = mol->DetermineCenterOfGravity();
    77     LOG(0,  "Center of gravity is " << CenterOfGravity << ".");
    78     Line RotationAxis(CenterOfGravity, params.Axis.get());
     76    Vector *CenterOfGravity = mol->DetermineCenterOfGravity();
     77    LOG(0,  "Center of gravity is " << *CenterOfGravity << ".");
     78    Line RotationAxis(*CenterOfGravity, params.Axis.get());
     79    delete(CenterOfGravity);
    7980    LOG(0, "Rotate " << mol->getName() << " around self by " << params.angle.get() << " radian around axis " << RotationAxis << ".");
    8081
     
    9293
    9394  BOOST_FOREACH(molecule *mol, state->selectedMolecules) {
    94     const Vector CenterOfGravity = mol->DetermineCenterOfGravity();
    95     LOG(0,  "Center of gravity is " <<CenterOfGravity << ".");
    96     Line RotationAxis(CenterOfGravity, state->params.Axis.get());
     95    Vector *CenterOfGravity = mol->DetermineCenterOfGravity();
     96    LOG(0,  "Center of gravity is " << *CenterOfGravity << ".");
     97    Line RotationAxis(*CenterOfGravity, state->params.Axis.get());
     98    delete(CenterOfGravity);
    9799    LOG(0, "Rotate " << mol->getName() << " around self by " << -state->params.angle.get() << " radian around axis " << RotationAxis << ".");
    98100
     
    109111
    110112  BOOST_FOREACH(molecule *mol, state->selectedMolecules) {
    111     const Vector CenterOfGravity = mol->DetermineCenterOfGravity();
    112     LOG(0,  "Center of gravity is " << CenterOfGravity << ".");
    113     Line RotationAxis(CenterOfGravity, state->params.Axis.get());
     113    Vector *CenterOfGravity = mol->DetermineCenterOfGravity();
     114    LOG(0,  "Center of gravity is " << *CenterOfGravity << ".");
     115    Line RotationAxis(*CenterOfGravity, state->params.Axis.get());
     116    delete(CenterOfGravity);
    114117    LOG(0, "Rotate " << mol->getName() << " around self by " << state->params.angle.get() << " radian around axis " << RotationAxis << ".");
    115118
Note: See TracChangeset for help on using the changeset viewer.