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