Ignore:
Timestamp:
Mar 1, 2010, 10:10:13 PM (15 years ago)
Author:
Frederik Heber <heber@…>
Children:
e49719
Parents:
075d08
git-author:
Frederik Heber <heber@…> (03/01/10 20:48:40)
git-committer:
Frederik Heber <heber@…> (03/01/10 22:10:13)
Message:

New class TriangleIntersection List and (hopefully) final fix of CorrelationToSurface().

  • Distances to surface were still calculated between the vector and the triangle plane not the triangle itself. Although functions such as BoundaryTriangleSet::GetClosestPointInsideTriangle had already been written.
  • As in class Tesselation there were many functions that all did the same: Calculate intersections between a point and all closeby triangles and then get the intersection or calculate this minimum distance and so ...
  • ... this was all put into a new class (in a new file): TriangleIntersectionList whose constructor scans all nearby triangles and put the calculates Intersections in the triangle into a list.
  • Functions as IsInside(), GetSmallestDistance(), GetClosestIntersection() and GetClosestTriangle() bring the desired functionality to the outside.
  • Respective functions in class Tesselation just make use of this new class and its member functions.
  • CorrelationToSurface() also directly instantiates this class to effectively use two of its functions.
  • Makefile.am has this new file in its SOURCES and HEADERS.
  • Tesselation:GetDistanceSquaredToSurface() -> Tesselation:GetDistanceToSurface(), FillBoxWithMolecule() has been adapted to this change.

AnalysisCorrelationToSurfaceUnitTest:

  • still has errors in it, as the distance were wrong before (because with respect to triangle plane, not triangle). Hence, the test was corrected.

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/tesselation.hpp

    r075d08 rf7b476  
    318318    bool IsInnerPoint(const Vector &Point, const LinkedCell* const LC) const;
    319319    double GetDistanceSquaredToTriangle(const Vector &Point, const BoundaryTriangleSet* const triangle) const;
    320     double GetDistanceSquaredToSurface(const Vector &Point, const LinkedCell* const LC) const;
     320    double GetDistanceToSurface(const Vector &Point, const LinkedCell* const LC) const;
     321    BoundaryTriangleSet * GetClosestTriangleOnSurface(const Vector &Point, const LinkedCell* const LC) const;
    321322    bool AddBoundaryPoint(TesselPoint * Walker, const int n);
    322323    DistanceToPointMap * FindClosestBoundaryPointsToVector(const Vector *x, const LinkedCell* LC) const;
Note: See TracChangeset for help on using the changeset viewer.