Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 #ifndef searchableSurfacesQueries_H
00036 #define searchableSurfacesQueries_H
00037 
00038 #include <meshTools/searchableSurface.H>
00039 
00040 
00041 
00042 namespace Foam
00043 {
00044 
00045 
00046 class plane;
00047 
00048 
00049 
00050 
00051 
00052 class searchableSurfacesQueries
00053 {
00054     
00055 
00056     
00057 
00058         
00059         static pointIndexHit tempFindNearest
00060         (
00061             const searchableSurface&,
00062             const point& pt,
00063             const scalar initDistSqr
00064         );
00065 
00066         
00067         
00068         
00069         static scalar sumDistSqr
00070         (
00071             const PtrList<searchableSurface>&,
00072             const labelList& surfacesToTest,
00073             const scalar initialDistSqr,    
00074             const point& pt
00075         );
00076 
00077         
00078         
00079         
00080         static scalar tryMorphTet
00081         (
00082             const PtrList<searchableSurface>&,
00083             const labelList& surfacesToTest,
00084             const scalar initialDistSqr,
00085             List<vector>& p,
00086             List<scalar>& y,
00087             vector& pSum,
00088             const label ihi,
00089             const scalar fac
00090         );
00091 
00092         
00093         
00094         
00095         
00096         static bool morphTet
00097         (
00098             const PtrList<searchableSurface>&,
00099             const labelList& surfacesToTest,
00100             const scalar initialDistSqr,
00101             const scalar convergenceDistSqr,
00102             const label maxIter,
00103             List<vector>& p,
00104             List<scalar>& y
00105         );
00106 
00107         
00108         
00109         
00110         
00111         
00112         
00113         
00114         
00115 
00116         static void mergeHits
00117         (
00118             const point& start,
00119             const scalar mergeDist,
00120 
00121             const label surfI,
00122             const List<pointIndexHit>& surfHits,
00123 
00124             labelList& allSurfaces,
00125             List<pointIndexHit>& allInfo,
00126             scalarList& allDistSqr
00127         );
00128 
00129 public:
00130 
00131     
00132     ClassName("searchableSurfacesQueries");
00133 
00134 
00135         
00136 
00137             
00138             
00139             
00140             static void findAnyIntersection
00141             (
00142                 const PtrList<searchableSurface>&,
00143                 const labelList& surfacesToTest,
00144                 const pointField& start,
00145                 const pointField& end,
00146                 labelList& surfaces,
00147                 List<pointIndexHit>&
00148             );
00149 
00150             
00151             
00152             static void findAllIntersections
00153             (
00154                 const PtrList<searchableSurface>&,
00155                 const labelList& surfacesToTest,
00156                 const pointField& start,
00157                 const pointField& end,
00158                 labelListList& surfaces,
00159                 List<List<pointIndexHit> >& surfaceHits
00160             );
00161 
00162             
00163             
00164             static void findNearest
00165             (
00166                 const PtrList<searchableSurface>&,
00167                 const labelList& surfacesToTest,
00168                 const pointField&,
00169                 const scalarField& nearestDistSqr,
00170                 labelList& surfaces,
00171                 List<pointIndexHit>&
00172             );
00173 
00174 
00175         
00176 
00177             
00178             static pointIndexHit facesIntersection
00179             (
00180                 const PtrList<searchableSurface>& allSurfaces,
00181                 const labelList& surfacesToTest,
00182                 const scalar initDistSqr,
00183                 const scalar convergenceDistSqr,
00184                 const point& start
00185             );
00186 };
00187 
00188 
00189 
00190 
00191 } 
00192 
00193 
00194 
00195 #endif
00196 
00197