Ignore:
Timestamp:
Aug 19, 2009, 12:22:08 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
6c09a4
Parents:
da84d6
Message:

Replaced Vector::Projection() by Vector::ScalarProduct()

  • Projection before was just a return of the Vector::ScalarProduct(). We change it now, to make it return a projected vector, the counterpart to ProjectOntoPlane
File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/boundary.cpp

    rda84d6 r66ce7a  
    308308
    309309      //*out << "Checking sign in quadrant : " << ProjectedVector.Projection(&AngleReferenceNormalVector) << "." << endl;
    310       if (ProjectedVector.Projection(&AngleReferenceNormalVector) > 0) {
     310      if (ProjectedVector.ScalarProduct(&AngleReferenceNormalVector) > 0) {
    311311        angle = 2. * M_PI - angle;
    312312      }
     
    804804      G = sqrt(((a + b + c) * (a + b + c) - 2 * (a * a + b * b + c * c)) / 16.); // area of tesselated triangle
    805805      x.MakeNormalVector(runner->second->endpoints[0]->node->node, runner->second->endpoints[1]->node->node, runner->second->endpoints[2]->node->node);
    806       x.Scale(runner->second->endpoints[1]->node->node->Projection(&x));
     806      x.Scale(runner->second->endpoints[1]->node->node->ScalarProduct(&x));
    807807      h = x.Norm(); // distance of CoG to triangle
    808808      PyramidVolume = (1. / 3.) * G * h; // this formula holds for _all_ pyramids (independent of n-edge base or (not) centered peak)
Note: See TracChangeset for help on using the changeset viewer.