surfaceLocation.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
00037
00038
00039
00040
00041
00042
00043
00044 #ifndef surfaceLocation_H
00045 #define surfaceLocation_H
00046
00047 #include "pointIndexHit.H"
00048 #include "triPointRef.H"
00049 #include "InfoProxy.H"
00050
00051
00052
00053 namespace Foam
00054 {
00055
00056
00057 class triSurface;
00058
00059
00060
00061
00062
00063 class surfaceLocation
00064 :
00065 public pointIndexHit
00066 {
00067
00068
00069 triPointRef::proxType elementType_;
00070
00071 label triangle_;
00072
00073 public:
00074
00075
00076
00077
00078
00079 surfaceLocation()
00080 :
00081 pointIndexHit(),
00082 elementType_(triPointRef::NONE),
00083 triangle_(-1)
00084 {}
00085
00086
00087 surfaceLocation
00088 (
00089 const pointIndexHit& pih,
00090 const triPointRef::proxType elementType,
00091 const label triangle
00092 )
00093 :
00094 pointIndexHit(pih),
00095 elementType_(elementType),
00096 triangle_(triangle)
00097 {}
00098
00099
00100 surfaceLocation(Istream& is)
00101 :
00102 pointIndexHit(is),
00103 elementType_(triPointRef::proxType(readLabel(is))),
00104 triangle_(readLabel(is))
00105 {}
00106
00107
00108
00109
00110 triPointRef::proxType& elementType()
00111 {
00112 return elementType_;
00113 }
00114
00115 triPointRef::proxType elementType() const
00116 {
00117 return elementType_;
00118 }
00119
00120 label& triangle()
00121 {
00122 return triangle_;
00123 }
00124
00125 label triangle() const
00126 {
00127 return triangle_;
00128 }
00129
00130
00131 vector normal(const triSurface& s) const;
00132
00133
00134
00135 InfoProxy<surfaceLocation> info() const
00136 {
00137 return *this;
00138 }
00139
00140
00141 void write(Ostream& os, const triSurface& s) const;
00142
00143
00144
00145
00146 friend Istream& operator>>(Istream& is, surfaceLocation& sl);
00147
00148 friend Ostream& operator<<(Ostream& os, const surfaceLocation& sl);
00149
00150 friend Ostream& operator<<
00151 (
00152 Ostream&,
00153 const InfoProxy<surfaceLocation>&
00154 );
00155 };
00156
00157
00158
00159
00160 }
00161
00162
00163
00164 #endif
00165
00166
Copyright © 2000-2009 OpenCFD Ltd