vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Interpolator.h
Go to the documentation of this file.
1 #pragma once
2 #include <osg\Referenced>
3 #include <osg\ref_ptr>
4 #include <vector>
5 #include "types.h"
6 #include <iostream>
7 
8 class Interpolator : public osg::Referenced
9 {
10 public:
11  virtual Vec3ArrayPtr interpolate(const Vec3ArrayPtr array, unsigned int interpolationSteps, bool closed) = 0;
12 
13  virtual std::string classDescription() const = 0;
14  virtual std::string className() const = 0;
15 
16 protected:
17  virtual ~Interpolator() {};
18 };
19 
20 typedef osg::ref_ptr<Interpolator> InterpolatorPtr;
21 
23 {
24  virtual Vec3ArrayPtr interpolate(const Vec3ArrayPtr array, unsigned int interpolationSteps, bool closed)
25  {
26  std::cerr << "NullInterpolator used!" << std::endl;
27  return new osg::Vec3Array;
28  }
29 };