00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00020 #ifndef SHWRAP_HPP
00021 #define SHWRAP_HPP
00022
00023 namespace SH {
00024
00030 template<typename T>
00031 class ShWrapClamp : public T {
00032 public:
00033 ShWrapClamp()
00034 : T()
00035 {
00036 this->m_node->traits().wrapping(ShTextureTraits::SH_WRAP_CLAMP);
00037 }
00038 ShWrapClamp(int width)
00039 : T(width)
00040 {
00041 this->m_node->traits().wrapping(ShTextureTraits::SH_WRAP_CLAMP);
00042 }
00043 ShWrapClamp(int width, int height)
00044 : T(width, height)
00045 {
00046 this->m_node->traits().wrapping(ShTextureTraits::SH_WRAP_CLAMP);
00047 }
00048 ShWrapClamp(int width, int height, int depth)
00049 : T(width, height, depth)
00050 {
00051 this->m_node->traits().wrapping(ShTextureTraits::SH_WRAP_CLAMP);
00052 }
00053
00054 typedef ShWrapClamp<typename T::rectangular_type> rectangular_type;
00055 typedef typename T::base_type base_type;
00056 typedef typename T::return_type return_type;
00057 };
00058
00064 template<typename T>
00065 class ShWrapClampToEdge : public T {
00066 public:
00067 ShWrapClampToEdge()
00068 : T()
00069 {
00070 this->m_node->traits().wrapping(ShTextureTraits::SH_WRAP_CLAMP_TO_EDGE);
00071 }
00072 ShWrapClampToEdge(int width)
00073 : T(width)
00074 {
00075 this->m_node->traits().wrapping(ShTextureTraits::SH_WRAP_CLAMP_TO_EDGE);
00076 }
00077 ShWrapClampToEdge(int width, int height)
00078 : T(width, height)
00079 {
00080 this->m_node->traits().wrapping(ShTextureTraits::SH_WRAP_CLAMP_TO_EDGE);
00081 }
00082 ShWrapClampToEdge(int width, int height, int depth)
00083 : T(width, height, depth)
00084 {
00085 this->m_node->traits().wrapping(ShTextureTraits::SH_WRAP_CLAMP_TO_EDGE);
00086 }
00087
00088 typedef ShWrapClampToEdge<typename T::rectangular_type> rectangular_type;
00089 typedef typename T::base_type base_type;
00090 typedef typename T::return_type return_type;
00091 };
00092
00098 template<typename T>
00099 class ShWrapRepeat : public T {
00100 public:
00101 ShWrapRepeat()
00102 : T()
00103 {
00104 this->m_node->traits().wrapping(ShTextureTraits::SH_WRAP_REPEAT);
00105 }
00106 ShWrapRepeat(int width)
00107 : T(width)
00108 {
00109 this->m_node->traits().wrapping(ShTextureTraits::SH_WRAP_REPEAT);
00110 }
00111 ShWrapRepeat(int width, int height)
00112 : T(width, height)
00113 {
00114 this->m_node->traits().wrapping(ShTextureTraits::SH_WRAP_REPEAT);
00115 }
00116 ShWrapRepeat(int width, int height, int depth)
00117 : T(width, height, depth)
00118 {
00119 this->m_node->traits().wrapping(ShTextureTraits::SH_WRAP_REPEAT);
00120 }
00121
00122 typedef ShWrapRepeat<typename T::rectangular_type> rectangular_type;
00123 typedef typename T::base_type base_type;
00124 typedef typename T::return_type return_type;
00125 };
00126
00127 }
00128
00129 #endif