50 lines
1.0 KiB
C++
50 lines
1.0 KiB
C++
#ifndef _COMMON_CATMULL_HPP_
|
|
#define _COMMON_CATMULL_HPP_
|
|
#ifndef _COMMON_WINDOWS_HPP_
|
|
#include <common/windows.hpp>
|
|
#endif
|
|
#ifndef _COMMON_GLOBALDATA_HPP_
|
|
#include <common/gdata.hpp>
|
|
#endif
|
|
#ifndef _ANALYTIC_FLOATPAIRS_HPP_
|
|
#include <analytic/pairs.hpp>
|
|
#endif
|
|
|
|
// Sample usage of the spline generator...
|
|
// CarmullRom splineGen;
|
|
// PureVector<FloatPairs> srcPairs;
|
|
// PureVector<FloatPairs> dstPairs;
|
|
// srcPairs[0]=FloatPairs(1.00,25);
|
|
// srcPairs[1]=FloatPairs(4.00,50);
|
|
// dstPairs[0]=FloatPairs(1.00,0.00);
|
|
// dstPairs[1]=FloatPairs(2.00,0.00);
|
|
// dstPairs[2]=FloatPairs(3.00,0.00);
|
|
// dstPairs[3]=FloatPairs(4.00,0.00);
|
|
// splineGen.performSpline(srcPairs,dstPairs);
|
|
// ... dstPairs contains interpolation of 25-50 across four points
|
|
|
|
class CatmullRom
|
|
{
|
|
public:
|
|
CatmullRom(void);
|
|
virtual ~CatmullRom();
|
|
BOOL performSpline(GlobalData<FloatPairs> &sourcePoints,GlobalData<FloatPairs> &destPoints);
|
|
private:
|
|
CatmullRom(const CatmullRom &someCatmullRom);
|
|
CatmullRom &operator=(const CatmullRom &someCatmullRom);
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|