gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
closestPoint.h
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 
6 #ifndef CLOSEST_POINT_H
7 #define CLOSEST_POINT_H
8 
9 #include "GmshConfig.h"
10 
11 #if defined(HAVE_ANN)
12 #include "ANN/ANN.h"
13 #endif
14 
15 #include "SPoint3.h"
16 
17 class GEntity;
19 #if defined(HAVE_ANN)
20  ANNkd_tree *kdtree;
21  ANNpointArray zeronodes;
22  ANNidxArray index;
23  ANNdistArray dist;
24 #endif
25  double _tolerance;
26 
27 public:
28  closestPointFinder(GEntity *, double);
30  SPoint3 operator()(const SPoint3 &p);
31  inline double tol() const { return _tolerance; }
32 };
33 
34 #endif
closestPointFinder::operator()
SPoint3 operator()(const SPoint3 &p)
Definition: closestPoint.cpp:71
closestPointFinder::closestPointFinder
closestPointFinder(GEntity *, double)
Definition: closestPoint.cpp:32
SPoint3
Definition: SPoint3.h:14
closestPointFinder::tol
double tol() const
Definition: closestPoint.h:31
GEntity
Definition: GEntity.h:31
closestPointFinder
Definition: closestPoint.h:18
SPoint3.h
closestPointFinder::_tolerance
double _tolerance
Definition: closestPoint.h:25
closestPointFinder::~closestPointFinder
~closestPointFinder()
Definition: closestPoint.cpp:61