Logo Search packages:      
Sourcecode: javamorph version File versions  Download package

static Point javamorph::CTriangulation::findNearest ( Point  p1  )  [inline, static, private]

Find the nearest neighbor of one mesh point.

p1 First point.
Nearest point to p1.

Definition at line 198 of file CTriangulation.java.

References points.

Referenced by work().

        double dist = Double.MAX_VALUE, d;
        Point result = null;
        for(Point p: points){
            d = p.distance(p1);
            if(d < dist && d > 0.0){
                dist = d;
                result = p;
        return result;

Generated by  Doxygen 1.6.0   Back to index