HyperspaceExplorer 0.7.1
FunctionHolder.h
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 #ifndef FUNCTIONHOLDER_H
00022 #define FUNCTIONHOLDER_H
00023 
00024 #include "VertexHolder.h"
00025 
00026 template <unsigned P> class DefinitionRangeOfDimension;
00027 
00042 template <unsigned N, unsigned P, typename NUM = double>
00043 class FunctionHolder : public VertexHolder<N, P, NUM> {
00044 
00045 public:
00046 
00048     typedef ParametricFunction<N, P, NUM> function_type;
00050     typedef VecMath::Vector<N, NUM> vertex_type;
00052     typedef VecMath::Vector<3, NUM> projected_vertex_type;
00053 
00054     FunctionHolder(ParameterMap parameters);
00055     FunctionHolder(std::shared_ptr< function_type > f);
00056     FunctionHolder(std::shared_ptr< function_type > f,
00057                    DefinitionRangeOfDimension<P> boundaries);
00058 
00059     virtual void Draw (UI::View *);
00060 
00061     void setDefinitionRange(double tmin, double tmax, double dt,
00062                             double umin, double umax, double du,
00063                             double vmin, double vmax, double dv);
00064     
00065     virtual unsigned getNumParameters();
00066 
00067 protected:
00068 
00069     virtual void Initialize (void);
00070 
00071     const DefinitionRangeOfDimension<P> &getDefinitionRange() const;
00072 
00073   private:
00074 
00075     class Impl;
00076     std::unique_ptr<Impl> pImpl_;
00077 
00078 };
00079 
00080 namespace {
00081   static DisplayableClass displayable_class_function_holder(
00082     "FunctionHolder", "Functions evaluated on a grid", "Displayable"
00083   );
00084 }
00085 
00086 #endif // FUNCTIONHOLDER_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends

Generated on Mon Apr 9 2012 20:25:14 for HyperspaceExplorer 0.7.1 by doxygen 1.7.4  -  Hosted bySourceForge.net Logo