1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | cfMesh: A library for mesh generation
5 \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6 \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of cfMesh.
11 cfMesh is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 3 of the License, or (at your
14 option) any later version.
16 cfMesh is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
25 coordinateModification
28 Base class for modifiers of point coordinates.
31 coordinateModification.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef coordinateModification_H
36 #define coordinateModification_H
40 #include "dictionary.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 // Forward declarations
52 /*---------------------------------------------------------------------------*\
53 Class coordinateModification Declaration
54 \*---------------------------------------------------------------------------*/
56 class coordinateModification
65 // Runtime type information
66 TypeName("coordinateModification");
72 coordinateModification();
74 //- Construct from dictionary
75 coordinateModification(const word& name, const dictionary&);
77 // Declare run-time constructor selection table
79 declareRunTimeSelectionTable
82 coordinateModification,
86 const dictionary& dict
94 //- Select constructed from dictionary
95 static autoPtr<coordinateModification> New
98 const dictionary& dict
103 virtual ~coordinateModification();
108 //- return the origin point of the modification object
109 virtual point origin() const = 0;
111 //- translate the object for backward transformation
112 virtual void translateAndModifyObject(const vector&) = 0;
114 //- calculate the displacement vector for this modification
115 virtual vector displacement(const point&) const = 0;
117 //- calculate the displacement vector for the backward modification
118 virtual vector backwardDisplacement(const point&) const = 0;
120 //- can this modification object be combined with other ones
121 virtual bool combiningPossible() const = 0;
123 //- return that "bounding planes" of the scaling region for
125 virtual void boundingPlanes(PtrList<plane>&) const = 0;
131 const word& name() const
137 void setName(const word& name)
142 //- Return as dictionary of entries
143 virtual dictionary dict(bool ignoreType = false) const = 0;
148 virtual void write(Ostream&) const = 0;
151 virtual void writeDict(Ostream&, bool subDict = true) const = 0;
155 //- assign from dictionary
156 virtual void operator=(const dictionary&) = 0;
158 // IOstream Operators
160 friend Ostream& operator<<(Ostream&, const coordinateModification&);
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 } // End namespace Foam
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 // ************************************************************************* //