searchableBox.H
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
00036 #ifndef searchableBox_H
00037 #define searchableBox_H
00038
00039 #include "searchableSurface.H"
00040 #include "treeBoundBox.H"
00041
00042
00043
00044 namespace Foam
00045 {
00046
00047
00048
00049
00050
00051
00052
00053 class searchableBox
00054 :
00055 public searchableSurface,
00056 public treeBoundBox
00057 {
00058 private:
00059
00060
00061
00062 mutable wordList regions_;
00063
00064
00065
00066
00067
00068 void projectOntoCoordPlane
00069 (
00070 const direction dir,
00071 const point& planePt,
00072 pointIndexHit& info
00073 ) const;
00074
00075
00076 pointIndexHit findNearest
00077 (
00078 const point& bbMid,
00079 const point& sample,
00080 const scalar nearestDistSqr
00081 ) const;
00082
00083
00084
00085 searchableBox(const searchableBox&);
00086
00087
00088 void operator=(const searchableBox&);
00089
00090
00091 public:
00092
00093
00094 TypeName("searchableBox");
00095
00096
00097
00098
00099
00100 searchableBox(const IOobject& io, const treeBoundBox& bb);
00101
00102
00103 searchableBox
00104 (
00105 const IOobject& io,
00106 const dictionary& dict
00107 );
00108
00109
00110
00111 virtual ~searchableBox();
00112
00113
00114
00115
00116 virtual const wordList& regions() const;
00117
00118
00119 virtual bool hasVolumeType() const
00120 {
00121 return true;
00122 }
00123
00124
00125 virtual label size() const
00126 {
00127 return 6;
00128 }
00129
00130
00131
00132
00133
00134
00135
00136
00137 pointIndexHit findNearest
00138 (
00139 const point& sample,
00140 const scalar nearestDistSqr
00141 ) const;
00142
00143
00144
00145
00146
00147 pointIndexHit findNearestOnEdge
00148 (
00149 const point& sample,
00150 const scalar nearestDistSqr
00151 ) const;
00152
00153
00154
00155
00156
00157
00158
00159
00160 pointIndexHit findNearest
00161 (
00162 const linePointRef& ln,
00163 treeBoundBox& tightest,
00164 point& linePoint
00165 ) const;
00166
00167
00168 pointIndexHit findLine
00169 (
00170 const point& start,
00171 const point& end
00172 ) const;
00173
00174
00175 pointIndexHit findLineAny
00176 (
00177 const point& start,
00178 const point& end
00179 ) const;
00180
00181
00182
00183
00184 virtual void findNearest
00185 (
00186 const pointField& sample,
00187 const scalarField& nearestDistSqr,
00188 List<pointIndexHit>&
00189 ) const;
00190
00191 virtual void findLine
00192 (
00193 const pointField& start,
00194 const pointField& end,
00195 List<pointIndexHit>&
00196 ) const;
00197
00198 virtual void findLineAny
00199 (
00200 const pointField& start,
00201 const pointField& end,
00202 List<pointIndexHit>&
00203 ) const;
00204
00205
00206 virtual void findLineAll
00207 (
00208 const pointField& start,
00209 const pointField& end,
00210 List<List<pointIndexHit> >&
00211 ) const;
00212
00213
00214 virtual void getRegion
00215 (
00216 const List<pointIndexHit>&,
00217 labelList& region
00218 ) const;
00219
00220
00221 virtual void getNormal
00222 (
00223 const List<pointIndexHit>&,
00224 vectorField& normal
00225 ) const;
00226
00227
00228
00229 virtual void getVolumeType
00230 (
00231 const pointField&,
00232 List<volumeType>&
00233 ) const;
00234
00235
00236
00237
00238 bool writeData(Ostream&) const
00239 {
00240 notImplemented("searchableBox::writeData(Ostream&) const");
00241 return false;
00242 }
00243
00244 };
00245
00246
00247
00248
00249 }
00250
00251
00252
00253 #endif
00254
00255
Copyright © 2000-2009 OpenCFD Ltd