GeoInterpolators.h

Go to the documentation of this file.
00001 
00002 //Luke Lenhart, 2004-2007
00003 //See /docs/License.txt for details on how this code may be used.
00004 
00005 #pragma once
00006 
00007 #include "Geo.h"
00008 #include <vector>
00009 
00010 namespace GEO
00011 {
00013     template <typename T> inline T Lerp(const T &e0, const T &e1, float w)
00014     {
00015         return (1.0f-w)*e0 + w*e1;
00016     }
00017 
00019     template <typename T> inline T Bilerp(const T &e00, const T &e10, const T &e01, const T &e11, float x, float y)
00020     {
00021         return Lerp( Lerp(e00,e10,x), Lerp(e01,e11,x), y);
00022     }
00023 
00024 }; //namespace GEO

Generated on Sat Aug 9 15:05:05 2008 for MPMA Framework by  doxygen 1.5.6