00001 // This file is part of ff3d - http://www.freefem.org/ff3d 00002 // Copyright (C) 2001, 2002, 2003 Stéphane Del Pino 00003 00004 // This program is free software; you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation; either version 2, or (at your option) 00007 // any later version. 00008 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program; if not, write to the Free Software Foundation, 00016 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 00018 // $Id: Transform.hpp,v 1.4 2006/10/01 23:25:58 delpinux Exp $ 00019 00020 // This class is the base class for all transformations such as 00021 // Rotations, Translations, ... 00022 00023 #ifndef TRANSFORM_HPP 00024 #define TRANSFORM_HPP 00025 00026 #include <string> 00027 00028 #include <Vertex.hpp> 00029 #include <TransType.h> 00030 00031 #include <ReferenceCounting.hpp> 00032 #include <ErrorHandler.hpp> 00033 00049 class Transform 00050 { 00051 protected: 00052 const TransType __type; 00054 public: 00060 inline const TransType& type() const 00061 { 00062 return __type; 00063 } 00064 00070 virtual std::string povWrite() const = 0; 00071 00079 virtual TinyVector<3,real_t> operator()(const TinyVector<3>& x) const = 0; 00080 00088 virtual TinyVector<3,real_t> inverse(const TinyVector<3>& x) const = 0; 00089 00095 virtual ReferenceCounting<Transform> getCopy() const = 0; 00096 00102 Transform(const TransType& type) 00103 : __type(type) 00104 { 00105 ; 00106 } 00107 00113 Transform(const Transform& t) 00114 : __type(t.__type) 00115 { 00116 ; 00117 } 00118 00123 virtual ~Transform() 00124 { 00125 ; 00126 } 00127 }; 00128 00129 #endif // TRANSFORM_HPP
1.5.6