Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/triangleintersectionlist.cpp

    r952f38 rbf3817  
    99 */
    1010
     11// include config.h
     12#ifdef HAVE_CONFIG_H
     13#include <config.h>
     14#endif
     15
    1116#include "Helpers/MemDebug.hpp"
    1217
     
    1621
    1722#include "Helpers/Info.hpp"
     23#include "BoundaryMaps.hpp"
     24#include "BoundaryPointSet.hpp"
     25#include "BoundaryLineSet.hpp"
     26#include "BoundaryTriangleSet.hpp"
    1827#include "tesselation.hpp"
    1928#include "LinearAlgebra/Vector.hpp"
     
    2332 *
    2433 */
    25 TriangleIntersectionList::TriangleIntersectionList(const Vector *x, const Tesselation *surface, const LinkedCell* LC) :
     34TriangleIntersectionList::TriangleIntersectionList(const Vector &x, const Tesselation *surface, const LinkedCell* LC) :
    2635  Point(x),
    2736  Tess(surface),
     
    7079  }
    7180  // return reference, if none can be found
    72   return *Point;
     81  return Point;
    7382};
    7483
     
    99108  if (runner != IntersectionList.end()) {
    100109    // if we have found one, check Scalarproduct between the vector
    101     Vector TestVector = (*Point) - (*(*runner).second);
     110    Vector TestVector = (Point) - (*(*runner).second);
    102111    if (fabs(TestVector.NormSquared()) < MYEPSILON) //
    103112      return true;
     
    138147    // get intersection with triangle plane
    139148    Intersection = new Vector;
    140     (*TriangleRunner)->GetClosestPointInsideTriangle(Point, Intersection);
    141     //Log() << Verbose(1) << "Intersection between " << *Point << " and " << **TriangleRunner << " is at " << *Intersection << "." << endl;
     149    (*TriangleRunner)->GetClosestPointInsideTriangle(Point, *Intersection);
     150    //Log() << Verbose(1) << "Intersection between " << Point << " and " << **TriangleRunner << " is at " << *Intersection << "." << endl;
    142151    IntersectionList.insert( pair<BoundaryTriangleSet *, Vector * > (*TriangleRunner, Intersection) );
    143152  }
     
    151160  if (DistanceList.empty())
    152161    for (TriangleVectorMap::const_iterator runner = IntersectionList.begin(); runner != IntersectionList.end(); runner++)
    153       DistanceList.insert( pair<double, BoundaryTriangleSet *> (Point->distance(*(*runner).second), (*runner).first) );
     162      DistanceList.insert( pair<double, BoundaryTriangleSet *> (Point.distance(*(*runner).second), (*runner).first) );
    154163
    155164  //for (DistanceTriangleMap::const_iterator runner = DistanceList.begin(); runner != DistanceList.end(); runner++)
Note: See TracChangeset for help on using the changeset viewer.