Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/triangleintersectionlist.cpp

    rbcf653 r952f38  
    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 
    81/*
    92 * triangleintersectionlist.cpp
     
    169 */
    1710
    18 // include config.h
    19 #ifdef HAVE_CONFIG_H
    20 #include <config.h>
    21 #endif
    22 
    2311#include "Helpers/MemDebug.hpp"
    2412
     
    2816
    2917#include "Helpers/Info.hpp"
    30 #include "BoundaryMaps.hpp"
    31 #include "BoundaryPointSet.hpp"
    32 #include "BoundaryLineSet.hpp"
    33 #include "BoundaryTriangleSet.hpp"
    3418#include "tesselation.hpp"
    3519#include "LinearAlgebra/Vector.hpp"
     
    3923 *
    4024 */
    41 TriangleIntersectionList::TriangleIntersectionList(const Vector &x, const Tesselation *surface, const LinkedCell* LC) :
     25TriangleIntersectionList::TriangleIntersectionList(const Vector *x, const Tesselation *surface, const LinkedCell* LC) :
    4226  Point(x),
    4327  Tess(surface),
     
    8670  }
    8771  // return reference, if none can be found
    88   return Point;
     72  return *Point;
    8973};
    9074
     
    11599  if (runner != IntersectionList.end()) {
    116100    // if we have found one, check Scalarproduct between the vector
    117     Vector TestVector = (Point) - (*(*runner).second);
     101    Vector TestVector = (*Point) - (*(*runner).second);
    118102    if (fabs(TestVector.NormSquared()) < MYEPSILON) //
    119103      return true;
     
    154138    // get intersection with triangle plane
    155139    Intersection = new Vector;
    156     (*TriangleRunner)->GetClosestPointInsideTriangle(Point, *Intersection);
    157     //Log() << Verbose(1) << "Intersection between " << Point << " and " << **TriangleRunner << " is at " << *Intersection << "." << endl;
     140    (*TriangleRunner)->GetClosestPointInsideTriangle(Point, Intersection);
     141    //Log() << Verbose(1) << "Intersection between " << *Point << " and " << **TriangleRunner << " is at " << *Intersection << "." << endl;
    158142    IntersectionList.insert( pair<BoundaryTriangleSet *, Vector * > (*TriangleRunner, Intersection) );
    159143  }
     
    167151  if (DistanceList.empty())
    168152    for (TriangleVectorMap::const_iterator runner = IntersectionList.begin(); runner != IntersectionList.end(); runner++)
    169       DistanceList.insert( pair<double, BoundaryTriangleSet *> (Point.distance(*(*runner).second), (*runner).first) );
     153      DistanceList.insert( pair<double, BoundaryTriangleSet *> (Point->distance(*(*runner).second), (*runner).first) );
    170154
    171155  //for (DistanceTriangleMap::const_iterator runner = DistanceList.begin(); runner != DistanceList.end(); runner++)
Note: See TracChangeset for help on using the changeset viewer.