HyperspaceExplorer 0.7.1
|
00001 /* 00002 Hyperspace Explorer - visualizing higher-dimensional geometry 00003 Copyright (C) 2010 Lene Preuss <lene.preuss@gmail.com> 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License along 00016 with this program; if not, write to the Free Software Foundation, Inc., 00017 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00018 00019 */ 00020 00021 #if(!defined SURFACE_H) 00022 #define SURFACE_H 00023 00024 #include "FunctionHolder.h" 00025 00026 #include "ParametricFunction.h" 00027 #include "MultiDimensionalVector.h" 00028 00029 #include <memory> 00030 00032 00033 00034 00036 00039 class Surface: public FunctionHolder<4, 2, double> { 00040 00041 public: 00042 00045 typedef VecMath::Vector<4> &function_type(double, double); 00047 typedef VecMath::Vector<4> raw_function_type (double, double); 00048 00049 Surface(); 00050 Surface (double umin, double umax, double du, 00051 double vmin, double vmax, double dv, 00052 ParameterMap parms = ParameterMap()); 00053 virtual ~Surface(); 00054 00055 virtual void ReInit(double _tmin, double _tmax, double _dt, 00056 double _umin, double _umax, double _du, 00057 double _vmin, double _vmax, double _dv); 00058 00060 VecMath::Vector<4> &operator () (double u, double v, double = 0); 00061 00063 virtual unsigned getNumParameters(); 00064 00065 protected: 00066 virtual VecMath::MultiDimensionalVector< VecMath::Vector<4>, 1 > df (double, double); 00067 virtual function_type normal; 00068 00069 void Initialize (void); 00070 00072 std::shared_ptr< ParametricFunction<4, 2> > _function; 00073 00074 private: 00075 00076 class Impl; 00077 Impl *pImpl_; 00078 00079 }; 00080 00081 namespace { 00082 static DisplayableClass displayable_class_surface( 00083 "Surface", "Surfaces in R^4", "Displayable" 00084 ); 00085 } 00086 00087 #endif