![]() |
|
00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2005 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software; you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM; if not, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Class 00026 rectangle2D 00027 00028 Description 00029 2D rectangle. 00030 00031 SourceFiles 00032 rectangle2DI.H 00033 rectangle2D.C 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef rectangle2D_H 00038 #define rectangle2D_H 00039 00040 #include "shape2D.H" 00041 #include "point2D.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 class Gstream; 00049 class Istream; 00050 class Ostream; 00051 00052 /*---------------------------------------------------------------------------*\ 00053 Class rectangle2D Declaration 00054 \*---------------------------------------------------------------------------*/ 00055 00056 class rectangle2D 00057 : 00058 public virtual shape2D 00059 { 00060 // Private data 00061 00062 point2D fstcorner; 00063 point2D sndcorner; 00064 00065 00066 public: 00067 00068 // Constructors 00069 00070 //- Construct from components 00071 rectangle2D(const point2D, const point2D); 00072 00073 //- Construct from Istream 00074 rectangle2D(Istream&); 00075 00076 00077 // Destructor 00078 00079 virtual ~rectangle2D(); 00080 00081 00082 // Member Functions 00083 00084 // Access 00085 00086 const point2D& first() const; 00087 const point2D& second() const; 00088 00089 00090 //- Draw 00091 virtual void draw(Gstream&) const; 00092 00093 //- Write 00094 virtual void write(Ostream&) const; 00095 00096 00097 // Member Operators 00098 00099 inline void operator=(const rectangle2D&); 00100 00101 00102 // Friend Operators 00103 00104 inline friend Gstream& operator<<(Gstream&, const rectangle2D&); 00105 00106 00107 // IOstream Operators 00108 00109 inline friend Ostream& operator<<(Ostream&, const rectangle2D&); 00110 }; 00111 00112 00113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00114 00115 } // End namespace Foam 00116 00117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00118 00119 #include "rectangle2DI.H" 00120 00121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00122 00123 #endif 00124 00125 // ************************************************************************* //