Changes in src/triangleintersectionlist.cpp [952f38:bcf653]
- 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 1 8 /* 2 9 * triangleintersectionlist.cpp … … 9 16 */ 10 17 18 // include config.h 19 #ifdef HAVE_CONFIG_H 20 #include <config.h> 21 #endif 22 11 23 #include "Helpers/MemDebug.hpp" 12 24 … … 16 28 17 29 #include "Helpers/Info.hpp" 30 #include "BoundaryMaps.hpp" 31 #include "BoundaryPointSet.hpp" 32 #include "BoundaryLineSet.hpp" 33 #include "BoundaryTriangleSet.hpp" 18 34 #include "tesselation.hpp" 19 35 #include "LinearAlgebra/Vector.hpp" … … 23 39 * 24 40 */ 25 TriangleIntersectionList::TriangleIntersectionList(const Vector *x, const Tesselation *surface, const LinkedCell* LC) :41 TriangleIntersectionList::TriangleIntersectionList(const Vector &x, const Tesselation *surface, const LinkedCell* LC) : 26 42 Point(x), 27 43 Tess(surface), … … 70 86 } 71 87 // return reference, if none can be found 72 return *Point;88 return Point; 73 89 }; 74 90 … … 99 115 if (runner != IntersectionList.end()) { 100 116 // if we have found one, check Scalarproduct between the vector 101 Vector TestVector = ( *Point) - (*(*runner).second);117 Vector TestVector = (Point) - (*(*runner).second); 102 118 if (fabs(TestVector.NormSquared()) < MYEPSILON) // 103 119 return true; … … 138 154 // get intersection with triangle plane 139 155 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; 142 158 IntersectionList.insert( pair<BoundaryTriangleSet *, Vector * > (*TriangleRunner, Intersection) ); 143 159 } … … 151 167 if (DistanceList.empty()) 152 168 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) ); 154 170 155 171 //for (DistanceTriangleMap::const_iterator runner = DistanceList.begin(); runner != DistanceList.end(); runner++)
Note:
See TracChangeset
for help on using the changeset viewer.