Ignore:
Timestamp:
May 25, 2016, 7:13:59 AM (9 years ago)
Author:
Frederik Heber <heber@…>
Children:
9cf90e
Parents:
46e561
git-author:
Frederik Heber <heber@…> (05/18/16 08:23:05)
git-committer:
Frederik Heber <heber@…> (05/25/16 07:13:59)
Message:

FIX: Need to check whether old and newcenter are not linear dependent.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/Exporters/SphericalPointDistribution.cpp

    r46e561 ra52369  
    704704    // calculate rotation axis and angle
    705705    Rotation.first = oldCenter;
    706     Rotation.first.VectorProduct(newCenter);
    707     Rotation.first.Normalize();
     706    if (oldCenter.IsParallelTo(newCenter, 1e-6))
     707      Rotation.first.GetOneNormalVector(oldCenter);
     708    else {
     709      Rotation.first.VectorProduct(newCenter);
     710      Rotation.first.Normalize();
     711    }
    708712    // construct reference vector to determine direction of rotation
    709713    const double sign = determineSignOfRotation(newCenter, oldCenter, Rotation.first);
Note: See TracChangeset for help on using the changeset viewer.