Mercurial > hg > kwantix
view src/include/vtkplot.hpp @ 42:3f8311cbf602
Setup initial class for vtkplot; cleanup interpolator to use C++1x's auto and untabify
author | Jordi Gutiérrez Hermoso <jordigh@gmail.com> |
---|---|
date | Sat, 13 Mar 2010 15:55:11 -0600 |
parents | 834f8e778a65 |
children | 8aea477c7cf8 |
line wrap: on
line source
#ifndef __VTKPLOTTING_HPP__ #define __VTKPLOTTING_HPP__ #include <string> #include <vtkSmartPointer.h> #include "interpolator.hpp" namespace kwantix{ ///A class for creating VTK plots class vtkplot{ public: /*! \brief Constructor performs a Delaunay triangulation on data * \param data - An \f$n \times 3\f$ matrix where the first two * columns are points in the x-y plane on which a * Delaunay triangulation will be done, and the * third column is the value at this point. */ template<typename RBF> vtkplot(const interpolator<RBF>& u, bool offscreen_in = false); ///Defines the view direction when plotting. void set_view_direction(const vector& dir); ///Without changing the triangulation, update the values. template<typename RBF> void update_values(const interpolator<RBF>& u); ///Enable offscreen plotting. void plot_offscreen(bool offscreen = true); ///Set the base filename used for saving, to which numbers are appended. void set_base_filename(const std::string& basename); ///Actually do the plot, whether offscreen or onscreen. void plot() const; private: ///Setup the initial pipeline template<typename RBF> void SetupPipeline(const interpolator<RBF>& u); ///Setup the pipeline to plot offscreen or not void InitOffscreen(); template<typename RBF> static void AdjustPoints(void* arguments); ///The associated interpolator's hash size_t hash; ///Base filename string basename; ///Direction from which to plot vector view_direction; ///Whether to plot offscreen or not bool offscreen; }; } #endif //__VTKPLOTTING_HPP__