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