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
00036 #ifndef triSurfaceMeshes_H
00037 #define triSurfaceMeshes_H
00038
00039 #include "triSurfaceMesh.H"
00040 #include "fileNameList.H"
00041 #include "treeDataTriSurface.H"
00042 #include "indexedOctree.H"
00043
00044
00045
00046 namespace Foam
00047 {
00048
00049
00050
00051
00052
00053
00054
00055 class triSurfaceMeshes
00056 :
00057 public PtrList<triSurfaceMesh>
00058 {
00059
00060
00061
00062 fileNameList names_;
00063
00064
00065 const labelList allSurfaces_;
00066
00067
00068 mutable autoPtr<PtrList<indexedOctree<treeDataTriSurface> > > treesPtr_;
00069
00070
00071
00072
00073 void calcTrees() const;
00074
00075
00076 triSurfaceMeshes(const triSurfaceMeshes&);
00077
00078
00079 void operator=(const triSurfaceMeshes&);
00080
00081
00082 public:
00083
00084
00085
00086
00087 triSurfaceMeshes(const IOobject& io, const fileNameList&);
00088
00089
00090 void clearOut();
00091
00092
00093
00094
00095
00096 static fileNameList allNames(const IOobject&);
00097
00098
00099 const fileNameList& names() const
00100 {
00101 return names_;
00102 }
00103
00104
00105 const PtrList<indexedOctree<treeDataTriSurface> >& trees() const
00106 {
00107 if (!treesPtr_.valid())
00108 {
00109 calcTrees();
00110 }
00111 return treesPtr_();
00112 }
00113
00114
00115
00116
00117 label findAnyIntersection
00118 (
00119 const labelList& surfacesToTest,
00120 const point& start,
00121 const point& end,
00122 pointIndexHit&
00123 ) const;
00124
00125 label findAnyIntersection
00126 (
00127 const point& start,
00128 const point& end,
00129 pointIndexHit&
00130 ) const;
00131
00132
00133
00134
00135 void findAllIntersections
00136 (
00137 const labelList& surfacesToTest,
00138 const point& start,
00139 const point& end,
00140 labelList& surfaces,
00141 List<pointIndexHit>& surfaceHits
00142 ) const;
00143
00144 void findAllIntersections
00145 (
00146 const point& start,
00147 const point& end,
00148 labelList& surfaces,
00149 List<pointIndexHit>& surfaceHits
00150 ) const;
00151
00152
00153
00154 void findNearestIntersection
00155 (
00156 const labelList& surfacesToTest,
00157 const point& start,
00158 const point& end,
00159
00160 label& surface1,
00161 pointIndexHit& hit1,
00162 label& surface2,
00163 pointIndexHit& hit2
00164 ) const;
00165
00166 void findNearestIntersection
00167 (
00168 const point& start,
00169 const point& end,
00170
00171 label& surface1,
00172 pointIndexHit& hit1,
00173 label& surface2,
00174 pointIndexHit& hit2
00175 ) const;
00176
00177
00178
00179
00180 label findNearest
00181 (
00182 const labelList& surfacesToTest,
00183 const point&,
00184 const scalar nearestDistSqr,
00185 pointIndexHit&
00186 ) const;
00187
00188 label findNearest
00189 (
00190 const point&,
00191 const scalar nearestDistSqr,
00192 pointIndexHit&
00193 ) const;
00194
00195 };
00196
00197
00198
00199
00200 }
00201
00202
00203
00204 #endif
00205
00206
Copyright © 2000-2007 OpenCFD Ltd