Ignore:
Timestamp:
Aug 19, 2009, 12:30:21 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
78dac6
Parents:
27459a (diff), 6c09a4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'VectorUnitTest' into ConcaveHull

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/tesselation.cpp

    r27459a rdaf5d6  
    349349
    350350  // make it always point inward (any offset vector onto plane projected onto normal vector suffices)
    351   if (NormalVector.Projection(&OtherVector) > 0)
     351  if (NormalVector.ScalarProduct(&OtherVector) > 0.)
    352352    NormalVector.Scale(-1.);
    353353};
     
    737737          TrialVector.CopyVector(checker->second->node->node);
    738738          TrialVector.SubtractVector(A->second->node->node);
    739           distance = TrialVector.Projection(&PlaneVector);
     739          distance = TrialVector.ScalarProduct(&PlaneVector);
    740740          if (fabs(distance) < 1e-4) // we need to have a small epsilon around 0 which is still ok
    741741            continue;
     
    897897        TempVector.SubtractVector(baseline->second->endpoints[0]->node->node); // TempVector is vector on triangle plane pointing from one baseline egde towards center!
    898898        //*out << Verbose(2) << "Projection of propagation onto temp: " << PropagationVector.Projection(&TempVector) << "." << endl;
    899         if (PropagationVector.Projection(&TempVector) > 0) // make sure normal propagation vector points outward from baseline
     899        if (PropagationVector.ScalarProduct(&TempVector) > 0) // make sure normal propagation vector points outward from baseline
    900900          PropagationVector.Scale(-1.);
    901901        *out << Verbose(4) << "PropagationVector of base triangle is " << PropagationVector << endl;
     
    957957            TempVector.SubtractVector(Center);
    958958            // make it always point outward
    959             if (VirtualNormalVector.Projection(&TempVector) < 0)
     959            if (VirtualNormalVector.ScalarProduct(&TempVector) < 0)
    960960              VirtualNormalVector.Scale(-1.);
    961961            // calculate angle
     
    15301530        AddTesselationLine(TPS[0], TPS[1], 0);
    15311531      }
    1532       cout << Verbose(2) << "Projection is " << BTS->NormalVector.Projection(&Oben) << "." << endl;
     1532      cout << Verbose(2) << "Projection is " << BTS->NormalVector.ScalarProduct(&Oben) << "." << endl;
    15331533    }
    15341534    if (BTS != NULL) // we have created one starting triangle
Note: See TracChangeset for help on using the changeset viewer.