00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00024 #ifndef SHCLAMPING_HPP
00025 #define SHCLAMPING_HPP
00026
00027 namespace SH {
00028
00034 template<typename T>
00035 class ShClamped : public T {
00036 public:
00037 ShClamped()
00038 : T()
00039 {
00040 this->m_node->traits().clamping(ShTextureTraits::SH_CLAMPED);
00041 }
00042 ShClamped(int width)
00043 : T(width)
00044 {
00045 this->m_node->traits().clamping(ShTextureTraits::SH_CLAMPED);
00046 }
00047 ShClamped(int width, int height)
00048 : T(width, height)
00049 {
00050 this->m_node->traits().clamping(ShTextureTraits::SH_CLAMPED);
00051 }
00052 ShClamped(int width, int height, int depth)
00053 : T(width, height, depth)
00054 {
00055 this->m_node->traits().clamping(ShTextureTraits::SH_CLAMPED);
00056 }
00057
00058 typedef ShClamped<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 ShUnclamped : public T {
00070 public:
00071 ShUnclamped()
00072 : T()
00073 {
00074 this->m_node->traits().clamping(ShTextureTraits::SH_UNCLAMPED);
00075 }
00076 ShUnclamped(int width)
00077 : T(width)
00078 {
00079 this->m_node->traits().clamping(ShTextureTraits::SH_UNCLAMPED);
00080 }
00081 ShUnclamped(int width, int height)
00082 : T(width, height)
00083 {
00084 this->m_node->traits().clamping(ShTextureTraits::SH_UNCLAMPED);
00085 }
00086 ShUnclamped(int width, int height, int depth)
00087 : T(width, height, depth)
00088 {
00089 this->m_node->traits().clamping(ShTextureTraits::SH_UNCLAMPED);
00090 }
00091
00092 typedef ShUnclamped<typename T::rectangular_type> rectangular_type;
00093 typedef typename T::base_type base_type;
00094 typedef typename T::return_type return_type;
00095 };
00096
00097 }
00098
00099 #endif