r643: no message
[ctsim.git] / include / interpolator.h
index d807ff805f08748c94c7610784cbd50de0f7f3ab..1b1fc484b2fc24b63f382dff5cd522e10ecce587 100644 (file)
@@ -2,7 +2,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: interpolator.h,v 1.3 2001/03/22 02:30:00 kevin Exp $
+**  $Id: interpolator.h,v 1.4 2001/03/24 05:28:28 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -34,6 +34,7 @@ public:
   double interpolate (double x);
 };
 
+
 class CubicPolyInterpolator {
 private:
   const double* const m_pdY;
@@ -88,6 +89,34 @@ public:
 };
 
 
+template<class T>
+class BicubicPolyInterpolator {
+private:
+  T** const m_ppMatrix;
+  const unsigned int m_nx;
+  const unsigned int m_ny;
+
+public:
+  BicubicPolyInterpolator (T** ppMatrix, unsigned int nx, unsigned int ny)
+  : m_ppMatrix(ppMatrix), m_nx(nx), m_ny(ny)
+  {}
+  
+  T interpolate (double dXPos, double dYPos)
+  {
+    int iFloorX = floor (dXPos);
+    int iFloorY = floor (dYPos);
+    double dXFrac = dXPos - iFloorX;
+    double dYFrac = dYPos - iFloorY;
+
+    T result = 0;
+
+    // Need to add code
+
+    return result;
+  }
+};
+
+
 template<class T>
 class LinearInterpolator {
 private: