00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00024 #ifndef SHINTERP_HPP
00025 #define SHINTERP_HPP
00026
00027 namespace SH {
00028
00035 template<int L, typename T>
00036 class ShInterp : public T {
00037 public:
00038 static int level() {
00039 if (L >= 2) return 3; else return L;
00040 }
00041
00042 ShInterp()
00043 : T()
00044 {
00045 this->m_node->traits().interpolation(level());
00046 }
00047 ShInterp(int width)
00048 : T(width)
00049 {
00050 this->m_node->traits().interpolation(level());
00051 }
00052 ShInterp(int width, int height)
00053 : T(width, height)
00054 {
00055 this->m_node->traits().interpolation(level());
00056 }
00057 ShInterp(int width, int height, int depth)
00058 : T(width, height, depth)
00059 {
00060 this->m_node->traits().interpolation(level());
00061 }
00062
00063 typedef typename T::return_type return_type;
00064
00065 };
00066
00067 }
00068
00069 #endif