Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/triangleintersectionlist.cpp

    r952f38 rbcf653  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * triangleintersectionlist.cpp
     
    916 */
    1017
     18// include config.h
     19#ifdef HAVE_CONFIG_H
     20#include <config.h>
     21#endif
     22
    1123#include "Helpers/MemDebug.hpp"
    1224
     
    1628
    1729#include "Helpers/Info.hpp"
     30#include "BoundaryMaps.hpp"
     31#include "BoundaryPointSet.hpp"
     32#include "BoundaryLineSet.hpp"
     33#include "BoundaryTriangleSet.hpp"
    1834#include "tesselation.hpp"
    1935#include "LinearAlgebra/Vector.hpp"
     
    2339 *
    2440 */
    25 TriangleIntersectionList::TriangleIntersectionList(const Vector *x, const Tesselation *surface, const LinkedCell* LC) :
     41TriangleIntersectionList::TriangleIntersectionList(const Vector &x, const Tesselation *surface, const LinkedCell* LC) :
    2642  Point(x),
    2743  Tess(surface),
     
    7086  }
    7187  // return reference, if none can be found
    72   return *Point;
     88  return Point;
    7389};
    7490
     
    99115  if (runner != IntersectionList.end()) {
    100116    // if we have found one, check Scalarproduct between the vector
    101     Vector TestVector = (*Point) - (*(*runner).second);
     117    Vector TestVector = (Point) - (*(*runner).second);
    102118    if (fabs(TestVector.NormSquared()) < MYEPSILON) //
    103119      return true;
     
    138154    // get intersection with triangle plane
    139155    Intersection = new Vector;
    140     (*TriangleRunner)->GetClosestPointInsideTriangle(Point, Intersection);
    141     //Log() << Verbose(1) << "Intersection between " << *Point << " and " << **TriangleRunner << " is at " << *Intersection << "." << endl;
     156    (*TriangleRunner)->GetClosestPointInsideTriangle(Point, *Intersection);
     157    //Log() << Verbose(1) << "Intersection between " << Point << " and " << **TriangleRunner << " is at " << *Intersection << "." << endl;
    142158    IntersectionList.insert( pair<BoundaryTriangleSet *, Vector * > (*TriangleRunner, Intersection) );
    143159  }
     
    151167  if (DistanceList.empty())
    152168    for (TriangleVectorMap::const_iterator runner = IntersectionList.begin(); runner != IntersectionList.end(); runner++)
    153       DistanceList.insert( pair<double, BoundaryTriangleSet *> (Point->distance(*(*runner).second), (*runner).first) );
     169      DistanceList.insert( pair<double, BoundaryTriangleSet *> (Point.distance(*(*runner).second), (*runner).first) );
    154170
    155171  //for (DistanceTriangleMap::const_iterator runner = DistanceList.begin(); runner != DistanceList.end(); runner++)
Note: See TracChangeset for help on using the changeset viewer.