Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ShAttribImpl.hpp

00001 // WARNING - DO NOT EDIT THIS FILE:
00002 // This file was automatically generated from scripts/ShAttribImpl.hpp.py.
00003 // If you wish to change it, edit that file instead.
00004 //
00005 // ---
00006 //
00007 // Sh: A GPU metaprogramming language.
00008 //
00009 // Copyright 2003-2005 Serious Hack Inc.
00010 // 
00011 // This software is provided 'as-is', without any express or implied
00012 // warranty. In no event will the authors be held liable for any damages
00013 // arising from the use of this software.
00014 // 
00015 // Permission is granted to anyone to use this software for any purpose,
00016 // including commercial applications, and to alter it and redistribute it
00017 // freely, subject to the following restrictions:
00018 // 
00019 // 1. The origin of this software must not be misrepresented; you must
00020 // not claim that you wrote the original software. If you use this
00021 // software in a product, an acknowledgment in the product documentation
00022 // would be appreciated but is not required.
00023 // 
00024 // 2. Altered source versions must be plainly marked as such, and must
00025 // not be misrepresented as being the original software.
00026 // 
00027 // 3. This notice may not be removed or altered from any source
00028 // distribution.
00030 
00031 #ifndef SH_SHATTRIBIMPL_HPP
00032 #define SH_SHATTRIBIMPL_HPP
00033 
00034 #include "ShAttrib.hpp"
00035 #include "ShContext.hpp"
00036 #include "ShStatement.hpp"
00037 #include "ShEnvironment.hpp"
00038 #include "ShDebug.hpp"
00039 
00040 namespace SH {
00041 
00042 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00043 ShAttrib<N, Binding, T, Semantic, Swizzled>::ShAttrib()
00044   : ShGeneric<N, T>(new ShVariableNode(Binding, N, ShStorageTypeInfo<T>::value_type, Semantic))
00045 {
00046 }
00047 
00048 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00049 template<typename T2>
00050 ShAttrib<N, Binding, T, Semantic, Swizzled>::ShAttrib(const ShGeneric<N, T2>& other)
00051   : ShGeneric<N, T>(new ShVariableNode(Binding, N, ShStorageTypeInfo<T>::value_type, Semantic))
00052 {
00053   shASN(*this, other);
00054 }
00055 
00056 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00057 ShAttrib<N, Binding, T, Semantic, Swizzled>::ShAttrib(const ShAttrib<N, Binding, T, Semantic, Swizzled>& other)
00058   : ShGeneric<N, T>(new ShVariableNode(Binding, N, ShStorageTypeInfo<T>::value_type, Semantic))
00059 {
00060   shASN(*this, other);
00061 }
00062 
00063 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00064 template<typename T2>
00065 ShAttrib<N, Binding, T, Semantic, Swizzled>::ShAttrib(const ShAttrib<N, Binding, T2, Semantic, Swizzled>& other)
00066   : ShGeneric<N, T>(new ShVariableNode(Binding, N, ShStorageTypeInfo<T>::value_type, Semantic))
00067 {
00068   shASN(*this, other);
00069 }
00070 
00071 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00072 ShAttrib<N, Binding, T, Semantic, Swizzled>::ShAttrib(const ShVariableNodePtr& node,
00073   const ShSwizzle& swizzle, bool neg)
00074   : ShGeneric<N, T>(node, swizzle, neg)
00075 {
00076 }
00077 
00078 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00079 ShAttrib<N, Binding, T, Semantic, Swizzled>::ShAttrib(host_type data[N])
00080   : ShGeneric<N, T>(new ShVariableNode(Binding, N, ShStorageTypeInfo<T>::value_type, Semantic))
00081 {
00082   if (Binding == SH_CONST) {
00083     for (int i = 0; i < N; i++) setValue(i, data[i]);
00084   } else {
00085     (*this) = ShAttrib<N, SH_CONST, T, Semantic>(data);
00086   }
00087 }
00088 
00089 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00090 ShAttrib<N, Binding, T, Semantic, Swizzled>::~ShAttrib()
00091 {
00092 }
00093 
00094 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00095 template<typename T2>
00096 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00097 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator=(const ShGeneric<N, T2>& other)
00098 {
00099   ParentType::operator=(other);
00100   return *this;
00101 }
00102 
00103 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00104 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00105 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator=(const ShAttrib<N, Binding, T, Semantic, Swizzled>& other)
00106 {
00107   ParentType::operator=(other);
00108   return *this;
00109 }
00110 
00111 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00112 template<typename T2>
00113 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00114 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator=(const ShAttrib<N, Binding, T2, Semantic, Swizzled>& other)
00115 {
00116   ParentType::operator=(other);
00117   return *this;
00118 }
00119 
00120 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00121 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00122 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator=(const ShProgram& prg)
00123 {
00124   ParentType::operator=(prg);
00125   return *this;
00126 }
00127 
00128 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00129 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00130 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator++()
00131 {
00132   ParentType::operator++();
00133   return *this;
00134 }
00135 
00136 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00137 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00138 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator--()
00139 {
00140   ParentType::operator--();
00141   return *this;
00142 }
00143 
00144 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00145 template<typename T2>
00146 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00147 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator+=(const ShGeneric<N, T2>& right)
00148 {
00149   ParentType::operator+=(right);
00150   return *this;
00151 }
00152 
00153 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00154 template<typename T2>
00155 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00156 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator-=(const ShGeneric<N, T2>& right)
00157 {
00158   ParentType::operator-=(right);
00159   return *this;
00160 }
00161 
00162 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00163 template<typename T2>
00164 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00165 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator*=(const ShGeneric<N, T2>& right)
00166 {
00167   ParentType::operator*=(right);
00168   return *this;
00169 }
00170 
00171 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00172 template<typename T2>
00173 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00174 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator/=(const ShGeneric<N, T2>& right)
00175 {
00176   ParentType::operator/=(right);
00177   return *this;
00178 }
00179 
00180 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00181 template<typename T2>
00182 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00183 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator%=(const ShGeneric<N, T2>& right)
00184 {
00185   ParentType::operator%=(right);
00186   return *this;
00187 }
00188 
00189 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00190 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00191 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator+=(host_type right)
00192 {
00193   ParentType::operator+=(right);
00194   return *this;
00195 }
00196 
00197 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00198 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00199 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator-=(host_type right)
00200 {
00201   ParentType::operator-=(right);
00202   return *this;
00203 }
00204 
00205 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00206 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00207 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator*=(host_type right)
00208 {
00209   ParentType::operator*=(right);
00210   return *this;
00211 }
00212 
00213 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00214 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00215 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator/=(host_type right)
00216 {
00217   ParentType::operator/=(right);
00218   return *this;
00219 }
00220 
00221 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00222 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00223 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator%=(host_type right)
00224 {
00225   ParentType::operator%=(right);
00226   return *this;
00227 }
00228 
00229 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00230 template<typename T2>
00231 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00232 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator+=(const ShGeneric<1, T2>& right)
00233 {
00234   ParentType::operator+=(right);
00235   return *this;
00236 }
00237 
00238 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00239 template<typename T2>
00240 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00241 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator-=(const ShGeneric<1, T2>& right)
00242 {
00243   ParentType::operator-=(right);
00244   return *this;
00245 }
00246 
00247 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00248 template<typename T2>
00249 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00250 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator*=(const ShGeneric<1, T2>& right)
00251 {
00252   ParentType::operator*=(right);
00253   return *this;
00254 }
00255 
00256 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00257 template<typename T2>
00258 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00259 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator/=(const ShGeneric<1, T2>& right)
00260 {
00261   ParentType::operator/=(right);
00262   return *this;
00263 }
00264 
00265 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00266 template<typename T2>
00267 ShAttrib<N, Binding, T, Semantic, Swizzled>&
00268 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator%=(const ShGeneric<1, T2>& right)
00269 {
00270   ParentType::operator%=(right);
00271   return *this;
00272 }
00273 
00274 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00275 ShAttrib<1, Binding, T, Semantic, true>
00276 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator()(int s0) const
00277 {
00278   return ShAttrib<1, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(N, s0), this->m_neg);
00279 }
00280 
00281 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00282 ShAttrib<2, Binding, T, Semantic, true>
00283 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator()(int s0, int s1) const
00284 {
00285   return ShAttrib<2, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(N, s0, s1), this->m_neg);
00286 }
00287 
00288 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00289 ShAttrib<3, Binding, T, Semantic, true>
00290 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator()(int s0, int s1, int s2) const
00291 {
00292   return ShAttrib<3, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(N, s0, s1, s2), this->m_neg);
00293 }
00294 
00295 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00296 ShAttrib<4, Binding, T, Semantic, true>
00297 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator()(int s0, int s1, int s2, int s3) const
00298 {
00299   return ShAttrib<4, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(N, s0, s1, s2, s3), this->m_neg);
00300 }
00301 
00302 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00303 template<int N2>
00304 ShAttrib<N2, Binding, T, Semantic, true>
00305 ShAttrib<N, Binding, T, Semantic, Swizzled>::swiz(int indices[]) const
00306 {
00307   return ShAttrib<N2, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(N, N2, indices), this->m_neg);
00308 }
00309 
00310 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00311 ShAttrib<1, Binding, T, Semantic, true>
00312 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator[](int s0) const
00313 {
00314   return ShAttrib<1, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(N, s0), this->m_neg);
00315 }
00316 
00317 template<int N, ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00318 ShAttrib<N, Binding, T, Semantic, Swizzled>
00319 ShAttrib<N, Binding, T, Semantic, Swizzled>::operator-() const
00320 {
00321   return ShAttrib<N, Binding, T, Semantic, Swizzled>(this->m_node, this->m_swizzle, !this->m_neg);
00322 }
00323 
00324 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00325 ShAttrib<1, Binding, T, Semantic, Swizzled>::ShAttrib()
00326   : ShGeneric<1, T>(new ShVariableNode(Binding, 1, ShStorageTypeInfo<T>::value_type, Semantic))
00327 {
00328 }
00329 
00330 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00331 template<typename T2>
00332 ShAttrib<1, Binding, T, Semantic, Swizzled>::ShAttrib(const ShGeneric<1, T2>& other)
00333   : ShGeneric<1, T>(new ShVariableNode(Binding, 1, ShStorageTypeInfo<T>::value_type, Semantic))
00334 {
00335   shASN(*this, other);
00336 }
00337 
00338 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00339 ShAttrib<1, Binding, T, Semantic, Swizzled>::ShAttrib(const ShAttrib<1, Binding, T, Semantic, Swizzled>& other)
00340   : ShGeneric<1, T>(new ShVariableNode(Binding, 1, ShStorageTypeInfo<T>::value_type, Semantic))
00341 {
00342   shASN(*this, other);
00343 }
00344 
00345 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00346 template<typename T2>
00347 ShAttrib<1, Binding, T, Semantic, Swizzled>::ShAttrib(const ShAttrib<1, Binding, T2, Semantic, Swizzled>& other)
00348   : ShGeneric<1, T>(new ShVariableNode(Binding, 1, ShStorageTypeInfo<T>::value_type, Semantic))
00349 {
00350   shASN(*this, other);
00351 }
00352 
00353 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00354 ShAttrib<1, Binding, T, Semantic, Swizzled>::ShAttrib(const ShVariableNodePtr& node,
00355   const ShSwizzle& swizzle, bool neg)
00356   : ShGeneric<1, T>(node, swizzle, neg)
00357 {
00358 }
00359 
00360 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00361 ShAttrib<1, Binding, T, Semantic, Swizzled>::ShAttrib(host_type data[1])
00362   : ShGeneric<1, T>(new ShVariableNode(Binding, 1, ShStorageTypeInfo<T>::value_type, Semantic))
00363 {
00364   if (Binding == SH_CONST) {
00365     for (int i = 0; i < 1; i++) setValue(i, data[i]);
00366   } else {
00367     (*this) = ShAttrib<1, SH_CONST, T, Semantic>(data);
00368   }
00369 }
00370 
00371 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00372 ShAttrib<1, Binding, T, Semantic, Swizzled>::ShAttrib(host_type s0)
00373   : ShGeneric<1, T>(new ShVariableNode(Binding, 1, ShStorageTypeInfo<T>::value_type, Semantic))
00374 {
00375   if (Binding == SH_CONST) {
00376     setValue(0, s0);
00377   } else {
00378     (*this) = ShAttrib<1, SH_CONST, T, Semantic>(s0);
00379   }
00380 }
00381 
00382 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00383 ShAttrib<1, Binding, T, Semantic, Swizzled>::~ShAttrib()
00384 {
00385 }
00386 
00387 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00388 template<typename T2>
00389 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00390 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator=(const ShGeneric<1, T2>& other)
00391 {
00392   ParentType::operator=(other);
00393   return *this;
00394 }
00395 
00396 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00397 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00398 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator=(const ShAttrib<1, Binding, T, Semantic, Swizzled>& other)
00399 {
00400   ParentType::operator=(other);
00401   return *this;
00402 }
00403 
00404 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00405 template<typename T2>
00406 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00407 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator=(const ShAttrib<1, Binding, T2, Semantic, Swizzled>& other)
00408 {
00409   ParentType::operator=(other);
00410   return *this;
00411 }
00412 
00413 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00414 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00415 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator=(host_type other)
00416 {
00417   ParentType::operator=(other);
00418   return *this;
00419 }
00420 
00421 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00422 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00423 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator=(const ShProgram& prg)
00424 {
00425   ParentType::operator=(prg);
00426   return *this;
00427 }
00428 
00429 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00430 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00431 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator++()
00432 {
00433   ParentType::operator++();
00434   return *this;
00435 }
00436 
00437 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00438 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00439 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator--()
00440 {
00441   ParentType::operator--();
00442   return *this;
00443 }
00444 
00445 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00446 template<typename T2>
00447 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00448 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator+=(const ShGeneric<1, T2>& right)
00449 {
00450   ParentType::operator+=(right);
00451   return *this;
00452 }
00453 
00454 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00455 template<typename T2>
00456 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00457 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator-=(const ShGeneric<1, T2>& right)
00458 {
00459   ParentType::operator-=(right);
00460   return *this;
00461 }
00462 
00463 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00464 template<typename T2>
00465 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00466 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator*=(const ShGeneric<1, T2>& right)
00467 {
00468   ParentType::operator*=(right);
00469   return *this;
00470 }
00471 
00472 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00473 template<typename T2>
00474 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00475 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator/=(const ShGeneric<1, T2>& right)
00476 {
00477   ParentType::operator/=(right);
00478   return *this;
00479 }
00480 
00481 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00482 template<typename T2>
00483 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00484 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator%=(const ShGeneric<1, T2>& right)
00485 {
00486   ParentType::operator%=(right);
00487   return *this;
00488 }
00489 
00490 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00491 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00492 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator+=(host_type right)
00493 {
00494   ParentType::operator+=(right);
00495   return *this;
00496 }
00497 
00498 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00499 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00500 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator-=(host_type right)
00501 {
00502   ParentType::operator-=(right);
00503   return *this;
00504 }
00505 
00506 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00507 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00508 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator*=(host_type right)
00509 {
00510   ParentType::operator*=(right);
00511   return *this;
00512 }
00513 
00514 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00515 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00516 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator/=(host_type right)
00517 {
00518   ParentType::operator/=(right);
00519   return *this;
00520 }
00521 
00522 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00523 ShAttrib<1, Binding, T, Semantic, Swizzled>&
00524 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator%=(host_type right)
00525 {
00526   ParentType::operator%=(right);
00527   return *this;
00528 }
00529 
00530 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00531 ShAttrib<1, Binding, T, Semantic, true>
00532 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator()(int s0) const
00533 {
00534   return ShAttrib<1, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(1, s0), this->m_neg);
00535 }
00536 
00537 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00538 ShAttrib<2, Binding, T, Semantic, true>
00539 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator()(int s0, int s1) const
00540 {
00541   return ShAttrib<2, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(1, s0, s1), this->m_neg);
00542 }
00543 
00544 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00545 ShAttrib<3, Binding, T, Semantic, true>
00546 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator()(int s0, int s1, int s2) const
00547 {
00548   return ShAttrib<3, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(1, s0, s1, s2), this->m_neg);
00549 }
00550 
00551 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00552 ShAttrib<4, Binding, T, Semantic, true>
00553 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator()(int s0, int s1, int s2, int s3) const
00554 {
00555   return ShAttrib<4, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(1, s0, s1, s2, s3), this->m_neg);
00556 }
00557 
00558 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00559 template<int N2>
00560 ShAttrib<N2, Binding, T, Semantic, true>
00561 ShAttrib<1, Binding, T, Semantic, Swizzled>::swiz(int indices[]) const
00562 {
00563   return ShAttrib<N2, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(1, N2, indices), this->m_neg);
00564 }
00565 
00566 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00567 ShAttrib<1, Binding, T, Semantic, true>
00568 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator[](int s0) const
00569 {
00570   return ShAttrib<1, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(1, s0), this->m_neg);
00571 }
00572 
00573 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00574 ShAttrib<1, Binding, T, Semantic, Swizzled>
00575 ShAttrib<1, Binding, T, Semantic, Swizzled>::operator-() const
00576 {
00577   return ShAttrib<1, Binding, T, Semantic, Swizzled>(this->m_node, this->m_swizzle, !this->m_neg);
00578 }
00579 
00580 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00581 ShAttrib<2, Binding, T, Semantic, Swizzled>::ShAttrib()
00582   : ShGeneric<2, T>(new ShVariableNode(Binding, 2, ShStorageTypeInfo<T>::value_type, Semantic))
00583 {
00584 }
00585 
00586 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00587 template<typename T2>
00588 ShAttrib<2, Binding, T, Semantic, Swizzled>::ShAttrib(const ShGeneric<2, T2>& other)
00589   : ShGeneric<2, T>(new ShVariableNode(Binding, 2, ShStorageTypeInfo<T>::value_type, Semantic))
00590 {
00591   shASN(*this, other);
00592 }
00593 
00594 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00595 ShAttrib<2, Binding, T, Semantic, Swizzled>::ShAttrib(const ShAttrib<2, Binding, T, Semantic, Swizzled>& other)
00596   : ShGeneric<2, T>(new ShVariableNode(Binding, 2, ShStorageTypeInfo<T>::value_type, Semantic))
00597 {
00598   shASN(*this, other);
00599 }
00600 
00601 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00602 template<typename T2>
00603 ShAttrib<2, Binding, T, Semantic, Swizzled>::ShAttrib(const ShAttrib<2, Binding, T2, Semantic, Swizzled>& other)
00604   : ShGeneric<2, T>(new ShVariableNode(Binding, 2, ShStorageTypeInfo<T>::value_type, Semantic))
00605 {
00606   shASN(*this, other);
00607 }
00608 
00609 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00610 ShAttrib<2, Binding, T, Semantic, Swizzled>::ShAttrib(const ShVariableNodePtr& node,
00611   const ShSwizzle& swizzle, bool neg)
00612   : ShGeneric<2, T>(node, swizzle, neg)
00613 {
00614 }
00615 
00616 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00617 ShAttrib<2, Binding, T, Semantic, Swizzled>::ShAttrib(host_type data[2])
00618   : ShGeneric<2, T>(new ShVariableNode(Binding, 2, ShStorageTypeInfo<T>::value_type, Semantic))
00619 {
00620   if (Binding == SH_CONST) {
00621     for (int i = 0; i < 2; i++) setValue(i, data[i]);
00622   } else {
00623     (*this) = ShAttrib<2, SH_CONST, T, Semantic>(data);
00624   }
00625 }
00626 
00627 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00628 ShAttrib<2, Binding, T, Semantic, Swizzled>::ShAttrib(host_type s0, host_type s1)
00629   : ShGeneric<2, T>(new ShVariableNode(Binding, 2, ShStorageTypeInfo<T>::value_type, Semantic))
00630 {
00631   if (Binding == SH_CONST) {
00632     setValue(0, s0);
00633     setValue(1, s1);
00634   } else {
00635     (*this) = ShAttrib<2, SH_CONST, T, Semantic>(s0, s1);
00636   }
00637 }
00638 
00639 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00640 template<typename T2, typename T3>
00641 ShAttrib<2, Binding, T, Semantic, Swizzled>::ShAttrib(const ShGeneric<1, T2>& s0, const ShGeneric<1, T3>& s1)
00642   : ShGeneric<2, T>(new ShVariableNode(Binding, 2, ShStorageTypeInfo<T>::value_type, Semantic))
00643 {
00644   if (Binding == SH_CONST) {
00645     SH_DEBUG_ASSERT(s0.hasValues());
00646     setValue(0, s0.getValue(0));
00647     SH_DEBUG_ASSERT(s1.hasValues());
00648     setValue(1, s1.getValue(0));
00649   } else {
00650     (*this)[0] = s0;
00651     (*this)[1] = s1;
00652   }
00653 }
00654 
00655 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00656 ShAttrib<2, Binding, T, Semantic, Swizzled>::~ShAttrib()
00657 {
00658 }
00659 
00660 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00661 template<typename T2>
00662 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00663 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator=(const ShGeneric<2, T2>& other)
00664 {
00665   ParentType::operator=(other);
00666   return *this;
00667 }
00668 
00669 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00670 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00671 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator=(const ShAttrib<2, Binding, T, Semantic, Swizzled>& other)
00672 {
00673   ParentType::operator=(other);
00674   return *this;
00675 }
00676 
00677 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00678 template<typename T2>
00679 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00680 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator=(const ShAttrib<2, Binding, T2, Semantic, Swizzled>& other)
00681 {
00682   ParentType::operator=(other);
00683   return *this;
00684 }
00685 
00686 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00687 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00688 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator=(const ShProgram& prg)
00689 {
00690   ParentType::operator=(prg);
00691   return *this;
00692 }
00693 
00694 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00695 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00696 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator++()
00697 {
00698   ParentType::operator++();
00699   return *this;
00700 }
00701 
00702 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00703 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00704 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator--()
00705 {
00706   ParentType::operator--();
00707   return *this;
00708 }
00709 
00710 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00711 template<typename T2>
00712 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00713 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator+=(const ShGeneric<2, T2>& right)
00714 {
00715   ParentType::operator+=(right);
00716   return *this;
00717 }
00718 
00719 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00720 template<typename T2>
00721 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00722 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator-=(const ShGeneric<2, T2>& right)
00723 {
00724   ParentType::operator-=(right);
00725   return *this;
00726 }
00727 
00728 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00729 template<typename T2>
00730 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00731 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator*=(const ShGeneric<2, T2>& right)
00732 {
00733   ParentType::operator*=(right);
00734   return *this;
00735 }
00736 
00737 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00738 template<typename T2>
00739 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00740 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator/=(const ShGeneric<2, T2>& right)
00741 {
00742   ParentType::operator/=(right);
00743   return *this;
00744 }
00745 
00746 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00747 template<typename T2>
00748 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00749 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator%=(const ShGeneric<2, T2>& right)
00750 {
00751   ParentType::operator%=(right);
00752   return *this;
00753 }
00754 
00755 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00756 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00757 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator+=(host_type right)
00758 {
00759   ParentType::operator+=(right);
00760   return *this;
00761 }
00762 
00763 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00764 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00765 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator-=(host_type right)
00766 {
00767   ParentType::operator-=(right);
00768   return *this;
00769 }
00770 
00771 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00772 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00773 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator*=(host_type right)
00774 {
00775   ParentType::operator*=(right);
00776   return *this;
00777 }
00778 
00779 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00780 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00781 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator/=(host_type right)
00782 {
00783   ParentType::operator/=(right);
00784   return *this;
00785 }
00786 
00787 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00788 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00789 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator%=(host_type right)
00790 {
00791   ParentType::operator%=(right);
00792   return *this;
00793 }
00794 
00795 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00796 template<typename T2>
00797 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00798 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator+=(const ShGeneric<1, T2>& right)
00799 {
00800   ParentType::operator+=(right);
00801   return *this;
00802 }
00803 
00804 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00805 template<typename T2>
00806 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00807 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator-=(const ShGeneric<1, T2>& right)
00808 {
00809   ParentType::operator-=(right);
00810   return *this;
00811 }
00812 
00813 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00814 template<typename T2>
00815 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00816 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator*=(const ShGeneric<1, T2>& right)
00817 {
00818   ParentType::operator*=(right);
00819   return *this;
00820 }
00821 
00822 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00823 template<typename T2>
00824 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00825 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator/=(const ShGeneric<1, T2>& right)
00826 {
00827   ParentType::operator/=(right);
00828   return *this;
00829 }
00830 
00831 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00832 template<typename T2>
00833 ShAttrib<2, Binding, T, Semantic, Swizzled>&
00834 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator%=(const ShGeneric<1, T2>& right)
00835 {
00836   ParentType::operator%=(right);
00837   return *this;
00838 }
00839 
00840 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00841 ShAttrib<1, Binding, T, Semantic, true>
00842 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator()(int s0) const
00843 {
00844   return ShAttrib<1, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(2, s0), this->m_neg);
00845 }
00846 
00847 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00848 ShAttrib<2, Binding, T, Semantic, true>
00849 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator()(int s0, int s1) const
00850 {
00851   return ShAttrib<2, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(2, s0, s1), this->m_neg);
00852 }
00853 
00854 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00855 ShAttrib<3, Binding, T, Semantic, true>
00856 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator()(int s0, int s1, int s2) const
00857 {
00858   return ShAttrib<3, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(2, s0, s1, s2), this->m_neg);
00859 }
00860 
00861 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00862 ShAttrib<4, Binding, T, Semantic, true>
00863 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator()(int s0, int s1, int s2, int s3) const
00864 {
00865   return ShAttrib<4, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(2, s0, s1, s2, s3), this->m_neg);
00866 }
00867 
00868 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00869 template<int N2>
00870 ShAttrib<N2, Binding, T, Semantic, true>
00871 ShAttrib<2, Binding, T, Semantic, Swizzled>::swiz(int indices[]) const
00872 {
00873   return ShAttrib<N2, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(2, N2, indices), this->m_neg);
00874 }
00875 
00876 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00877 ShAttrib<1, Binding, T, Semantic, true>
00878 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator[](int s0) const
00879 {
00880   return ShAttrib<1, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(2, s0), this->m_neg);
00881 }
00882 
00883 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00884 ShAttrib<2, Binding, T, Semantic, Swizzled>
00885 ShAttrib<2, Binding, T, Semantic, Swizzled>::operator-() const
00886 {
00887   return ShAttrib<2, Binding, T, Semantic, Swizzled>(this->m_node, this->m_swizzle, !this->m_neg);
00888 }
00889 
00890 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00891 ShAttrib<3, Binding, T, Semantic, Swizzled>::ShAttrib()
00892   : ShGeneric<3, T>(new ShVariableNode(Binding, 3, ShStorageTypeInfo<T>::value_type, Semantic))
00893 {
00894 }
00895 
00896 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00897 template<typename T2>
00898 ShAttrib<3, Binding, T, Semantic, Swizzled>::ShAttrib(const ShGeneric<3, T2>& other)
00899   : ShGeneric<3, T>(new ShVariableNode(Binding, 3, ShStorageTypeInfo<T>::value_type, Semantic))
00900 {
00901   shASN(*this, other);
00902 }
00903 
00904 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00905 ShAttrib<3, Binding, T, Semantic, Swizzled>::ShAttrib(const ShAttrib<3, Binding, T, Semantic, Swizzled>& other)
00906   : ShGeneric<3, T>(new ShVariableNode(Binding, 3, ShStorageTypeInfo<T>::value_type, Semantic))
00907 {
00908   shASN(*this, other);
00909 }
00910 
00911 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00912 template<typename T2>
00913 ShAttrib<3, Binding, T, Semantic, Swizzled>::ShAttrib(const ShAttrib<3, Binding, T2, Semantic, Swizzled>& other)
00914   : ShGeneric<3, T>(new ShVariableNode(Binding, 3, ShStorageTypeInfo<T>::value_type, Semantic))
00915 {
00916   shASN(*this, other);
00917 }
00918 
00919 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00920 ShAttrib<3, Binding, T, Semantic, Swizzled>::ShAttrib(const ShVariableNodePtr& node,
00921   const ShSwizzle& swizzle, bool neg)
00922   : ShGeneric<3, T>(node, swizzle, neg)
00923 {
00924 }
00925 
00926 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00927 ShAttrib<3, Binding, T, Semantic, Swizzled>::ShAttrib(host_type data[3])
00928   : ShGeneric<3, T>(new ShVariableNode(Binding, 3, ShStorageTypeInfo<T>::value_type, Semantic))
00929 {
00930   if (Binding == SH_CONST) {
00931     for (int i = 0; i < 3; i++) setValue(i, data[i]);
00932   } else {
00933     (*this) = ShAttrib<3, SH_CONST, T, Semantic>(data);
00934   }
00935 }
00936 
00937 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00938 ShAttrib<3, Binding, T, Semantic, Swizzled>::ShAttrib(host_type s0, host_type s1, host_type s2)
00939   : ShGeneric<3, T>(new ShVariableNode(Binding, 3, ShStorageTypeInfo<T>::value_type, Semantic))
00940 {
00941   if (Binding == SH_CONST) {
00942     setValue(0, s0);
00943     setValue(1, s1);
00944     setValue(2, s2);
00945   } else {
00946     (*this) = ShAttrib<3, SH_CONST, T, Semantic>(s0, s1, s2);
00947   }
00948 }
00949 
00950 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00951 template<typename T2, typename T3, typename T4>
00952 ShAttrib<3, Binding, T, Semantic, Swizzled>::ShAttrib(const ShGeneric<1, T2>& s0, const ShGeneric<1, T3>& s1, const ShGeneric<1, T4>& s2)
00953   : ShGeneric<3, T>(new ShVariableNode(Binding, 3, ShStorageTypeInfo<T>::value_type, Semantic))
00954 {
00955   if (Binding == SH_CONST) {
00956     SH_DEBUG_ASSERT(s0.hasValues());
00957     setValue(0, s0.getValue(0));
00958     SH_DEBUG_ASSERT(s1.hasValues());
00959     setValue(1, s1.getValue(0));
00960     SH_DEBUG_ASSERT(s2.hasValues());
00961     setValue(2, s2.getValue(0));
00962   } else {
00963     (*this)[0] = s0;
00964     (*this)[1] = s1;
00965     (*this)[2] = s2;
00966   }
00967 }
00968 
00969 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00970 ShAttrib<3, Binding, T, Semantic, Swizzled>::~ShAttrib()
00971 {
00972 }
00973 
00974 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00975 template<typename T2>
00976 ShAttrib<3, Binding, T, Semantic, Swizzled>&
00977 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator=(const ShGeneric<3, T2>& other)
00978 {
00979   ParentType::operator=(other);
00980   return *this;
00981 }
00982 
00983 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00984 ShAttrib<3, Binding, T, Semantic, Swizzled>&
00985 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator=(const ShAttrib<3, Binding, T, Semantic, Swizzled>& other)
00986 {
00987   ParentType::operator=(other);
00988   return *this;
00989 }
00990 
00991 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
00992 template<typename T2>
00993 ShAttrib<3, Binding, T, Semantic, Swizzled>&
00994 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator=(const ShAttrib<3, Binding, T2, Semantic, Swizzled>& other)
00995 {
00996   ParentType::operator=(other);
00997   return *this;
00998 }
00999 
01000 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01001 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01002 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator=(const ShProgram& prg)
01003 {
01004   ParentType::operator=(prg);
01005   return *this;
01006 }
01007 
01008 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01009 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01010 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator++()
01011 {
01012   ParentType::operator++();
01013   return *this;
01014 }
01015 
01016 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01017 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01018 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator--()
01019 {
01020   ParentType::operator--();
01021   return *this;
01022 }
01023 
01024 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01025 template<typename T2>
01026 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01027 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator+=(const ShGeneric<3, T2>& right)
01028 {
01029   ParentType::operator+=(right);
01030   return *this;
01031 }
01032 
01033 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01034 template<typename T2>
01035 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01036 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator-=(const ShGeneric<3, T2>& right)
01037 {
01038   ParentType::operator-=(right);
01039   return *this;
01040 }
01041 
01042 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01043 template<typename T2>
01044 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01045 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator*=(const ShGeneric<3, T2>& right)
01046 {
01047   ParentType::operator*=(right);
01048   return *this;
01049 }
01050 
01051 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01052 template<typename T2>
01053 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01054 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator/=(const ShGeneric<3, T2>& right)
01055 {
01056   ParentType::operator/=(right);
01057   return *this;
01058 }
01059 
01060 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01061 template<typename T2>
01062 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01063 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator%=(const ShGeneric<3, T2>& right)
01064 {
01065   ParentType::operator%=(right);
01066   return *this;
01067 }
01068 
01069 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01070 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01071 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator+=(host_type right)
01072 {
01073   ParentType::operator+=(right);
01074   return *this;
01075 }
01076 
01077 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01078 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01079 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator-=(host_type right)
01080 {
01081   ParentType::operator-=(right);
01082   return *this;
01083 }
01084 
01085 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01086 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01087 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator*=(host_type right)
01088 {
01089   ParentType::operator*=(right);
01090   return *this;
01091 }
01092 
01093 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01094 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01095 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator/=(host_type right)
01096 {
01097   ParentType::operator/=(right);
01098   return *this;
01099 }
01100 
01101 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01102 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01103 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator%=(host_type right)
01104 {
01105   ParentType::operator%=(right);
01106   return *this;
01107 }
01108 
01109 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01110 template<typename T2>
01111 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01112 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator+=(const ShGeneric<1, T2>& right)
01113 {
01114   ParentType::operator+=(right);
01115   return *this;
01116 }
01117 
01118 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01119 template<typename T2>
01120 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01121 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator-=(const ShGeneric<1, T2>& right)
01122 {
01123   ParentType::operator-=(right);
01124   return *this;
01125 }
01126 
01127 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01128 template<typename T2>
01129 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01130 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator*=(const ShGeneric<1, T2>& right)
01131 {
01132   ParentType::operator*=(right);
01133   return *this;
01134 }
01135 
01136 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01137 template<typename T2>
01138 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01139 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator/=(const ShGeneric<1, T2>& right)
01140 {
01141   ParentType::operator/=(right);
01142   return *this;
01143 }
01144 
01145 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01146 template<typename T2>
01147 ShAttrib<3, Binding, T, Semantic, Swizzled>&
01148 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator%=(const ShGeneric<1, T2>& right)
01149 {
01150   ParentType::operator%=(right);
01151   return *this;
01152 }
01153 
01154 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01155 ShAttrib<1, Binding, T, Semantic, true>
01156 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator()(int s0) const
01157 {
01158   return ShAttrib<1, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(3, s0), this->m_neg);
01159 }
01160 
01161 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01162 ShAttrib<2, Binding, T, Semantic, true>
01163 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator()(int s0, int s1) const
01164 {
01165   return ShAttrib<2, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(3, s0, s1), this->m_neg);
01166 }
01167 
01168 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01169 ShAttrib<3, Binding, T, Semantic, true>
01170 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator()(int s0, int s1, int s2) const
01171 {
01172   return ShAttrib<3, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(3, s0, s1, s2), this->m_neg);
01173 }
01174 
01175 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01176 ShAttrib<4, Binding, T, Semantic, true>
01177 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator()(int s0, int s1, int s2, int s3) const
01178 {
01179   return ShAttrib<4, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(3, s0, s1, s2, s3), this->m_neg);
01180 }
01181 
01182 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01183 template<int N2>
01184 ShAttrib<N2, Binding, T, Semantic, true>
01185 ShAttrib<3, Binding, T, Semantic, Swizzled>::swiz(int indices[]) const
01186 {
01187   return ShAttrib<N2, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(3, N2, indices), this->m_neg);
01188 }
01189 
01190 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01191 ShAttrib<1, Binding, T, Semantic, true>
01192 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator[](int s0) const
01193 {
01194   return ShAttrib<1, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(3, s0), this->m_neg);
01195 }
01196 
01197 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01198 ShAttrib<3, Binding, T, Semantic, Swizzled>
01199 ShAttrib<3, Binding, T, Semantic, Swizzled>::operator-() const
01200 {
01201   return ShAttrib<3, Binding, T, Semantic, Swizzled>(this->m_node, this->m_swizzle, !this->m_neg);
01202 }
01203 
01204 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01205 ShAttrib<4, Binding, T, Semantic, Swizzled>::ShAttrib()
01206   : ShGeneric<4, T>(new ShVariableNode(Binding, 4, ShStorageTypeInfo<T>::value_type, Semantic))
01207 {
01208 }
01209 
01210 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01211 template<typename T2>
01212 ShAttrib<4, Binding, T, Semantic, Swizzled>::ShAttrib(const ShGeneric<4, T2>& other)
01213   : ShGeneric<4, T>(new ShVariableNode(Binding, 4, ShStorageTypeInfo<T>::value_type, Semantic))
01214 {
01215   shASN(*this, other);
01216 }
01217 
01218 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01219 ShAttrib<4, Binding, T, Semantic, Swizzled>::ShAttrib(const ShAttrib<4, Binding, T, Semantic, Swizzled>& other)
01220   : ShGeneric<4, T>(new ShVariableNode(Binding, 4, ShStorageTypeInfo<T>::value_type, Semantic))
01221 {
01222   shASN(*this, other);
01223 }
01224 
01225 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01226 template<typename T2>
01227 ShAttrib<4, Binding, T, Semantic, Swizzled>::ShAttrib(const ShAttrib<4, Binding, T2, Semantic, Swizzled>& other)
01228   : ShGeneric<4, T>(new ShVariableNode(Binding, 4, ShStorageTypeInfo<T>::value_type, Semantic))
01229 {
01230   shASN(*this, other);
01231 }
01232 
01233 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01234 ShAttrib<4, Binding, T, Semantic, Swizzled>::ShAttrib(const ShVariableNodePtr& node,
01235   const ShSwizzle& swizzle, bool neg)
01236   : ShGeneric<4, T>(node, swizzle, neg)
01237 {
01238 }
01239 
01240 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01241 ShAttrib<4, Binding, T, Semantic, Swizzled>::ShAttrib(host_type data[4])
01242   : ShGeneric<4, T>(new ShVariableNode(Binding, 4, ShStorageTypeInfo<T>::value_type, Semantic))
01243 {
01244   if (Binding == SH_CONST) {
01245     for (int i = 0; i < 4; i++) setValue(i, data[i]);
01246   } else {
01247     (*this) = ShAttrib<4, SH_CONST, T, Semantic>(data);
01248   }
01249 }
01250 
01251 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01252 ShAttrib<4, Binding, T, Semantic, Swizzled>::ShAttrib(host_type s0, host_type s1, host_type s2, host_type s3)
01253   : ShGeneric<4, T>(new ShVariableNode(Binding, 4, ShStorageTypeInfo<T>::value_type, Semantic))
01254 {
01255   if (Binding == SH_CONST) {
01256     setValue(0, s0);
01257     setValue(1, s1);
01258     setValue(2, s2);
01259     setValue(3, s3);
01260   } else {
01261     (*this) = ShAttrib<4, SH_CONST, T, Semantic>(s0, s1, s2, s3);
01262   }
01263 }
01264 
01265 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01266 template<typename T2, typename T3, typename T4, typename T5>
01267 ShAttrib<4, Binding, T, Semantic, Swizzled>::ShAttrib(const ShGeneric<1, T2>& s0, const ShGeneric<1, T3>& s1, const ShGeneric<1, T4>& s2, const ShGeneric<1, T5>& s3)
01268   : ShGeneric<4, T>(new ShVariableNode(Binding, 4, ShStorageTypeInfo<T>::value_type, Semantic))
01269 {
01270   if (Binding == SH_CONST) {
01271     SH_DEBUG_ASSERT(s0.hasValues());
01272     setValue(0, s0.getValue(0));
01273     SH_DEBUG_ASSERT(s1.hasValues());
01274     setValue(1, s1.getValue(0));
01275     SH_DEBUG_ASSERT(s2.hasValues());
01276     setValue(2, s2.getValue(0));
01277     SH_DEBUG_ASSERT(s3.hasValues());
01278     setValue(3, s3.getValue(0));
01279   } else {
01280     (*this)[0] = s0;
01281     (*this)[1] = s1;
01282     (*this)[2] = s2;
01283     (*this)[3] = s3;
01284   }
01285 }
01286 
01287 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01288 ShAttrib<4, Binding, T, Semantic, Swizzled>::~ShAttrib()
01289 {
01290 }
01291 
01292 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01293 template<typename T2>
01294 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01295 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator=(const ShGeneric<4, T2>& other)
01296 {
01297   ParentType::operator=(other);
01298   return *this;
01299 }
01300 
01301 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01302 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01303 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator=(const ShAttrib<4, Binding, T, Semantic, Swizzled>& other)
01304 {
01305   ParentType::operator=(other);
01306   return *this;
01307 }
01308 
01309 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01310 template<typename T2>
01311 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01312 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator=(const ShAttrib<4, Binding, T2, Semantic, Swizzled>& other)
01313 {
01314   ParentType::operator=(other);
01315   return *this;
01316 }
01317 
01318 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01319 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01320 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator=(const ShProgram& prg)
01321 {
01322   ParentType::operator=(prg);
01323   return *this;
01324 }
01325 
01326 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01327 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01328 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator++()
01329 {
01330   ParentType::operator++();
01331   return *this;
01332 }
01333 
01334 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01335 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01336 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator--()
01337 {
01338   ParentType::operator--();
01339   return *this;
01340 }
01341 
01342 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01343 template<typename T2>
01344 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01345 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator+=(const ShGeneric<4, T2>& right)
01346 {
01347   ParentType::operator+=(right);
01348   return *this;
01349 }
01350 
01351 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01352 template<typename T2>
01353 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01354 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator-=(const ShGeneric<4, T2>& right)
01355 {
01356   ParentType::operator-=(right);
01357   return *this;
01358 }
01359 
01360 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01361 template<typename T2>
01362 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01363 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator*=(const ShGeneric<4, T2>& right)
01364 {
01365   ParentType::operator*=(right);
01366   return *this;
01367 }
01368 
01369 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01370 template<typename T2>
01371 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01372 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator/=(const ShGeneric<4, T2>& right)
01373 {
01374   ParentType::operator/=(right);
01375   return *this;
01376 }
01377 
01378 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01379 template<typename T2>
01380 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01381 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator%=(const ShGeneric<4, T2>& right)
01382 {
01383   ParentType::operator%=(right);
01384   return *this;
01385 }
01386 
01387 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01388 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01389 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator+=(host_type right)
01390 {
01391   ParentType::operator+=(right);
01392   return *this;
01393 }
01394 
01395 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01396 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01397 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator-=(host_type right)
01398 {
01399   ParentType::operator-=(right);
01400   return *this;
01401 }
01402 
01403 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01404 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01405 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator*=(host_type right)
01406 {
01407   ParentType::operator*=(right);
01408   return *this;
01409 }
01410 
01411 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01412 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01413 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator/=(host_type right)
01414 {
01415   ParentType::operator/=(right);
01416   return *this;
01417 }
01418 
01419 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01420 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01421 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator%=(host_type right)
01422 {
01423   ParentType::operator%=(right);
01424   return *this;
01425 }
01426 
01427 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01428 template<typename T2>
01429 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01430 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator+=(const ShGeneric<1, T2>& right)
01431 {
01432   ParentType::operator+=(right);
01433   return *this;
01434 }
01435 
01436 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01437 template<typename T2>
01438 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01439 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator-=(const ShGeneric<1, T2>& right)
01440 {
01441   ParentType::operator-=(right);
01442   return *this;
01443 }
01444 
01445 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01446 template<typename T2>
01447 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01448 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator*=(const ShGeneric<1, T2>& right)
01449 {
01450   ParentType::operator*=(right);
01451   return *this;
01452 }
01453 
01454 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01455 template<typename T2>
01456 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01457 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator/=(const ShGeneric<1, T2>& right)
01458 {
01459   ParentType::operator/=(right);
01460   return *this;
01461 }
01462 
01463 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01464 template<typename T2>
01465 ShAttrib<4, Binding, T, Semantic, Swizzled>&
01466 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator%=(const ShGeneric<1, T2>& right)
01467 {
01468   ParentType::operator%=(right);
01469   return *this;
01470 }
01471 
01472 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01473 ShAttrib<1, Binding, T, Semantic, true>
01474 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator()(int s0) const
01475 {
01476   return ShAttrib<1, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(4, s0), this->m_neg);
01477 }
01478 
01479 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01480 ShAttrib<2, Binding, T, Semantic, true>
01481 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator()(int s0, int s1) const
01482 {
01483   return ShAttrib<2, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(4, s0, s1), this->m_neg);
01484 }
01485 
01486 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01487 ShAttrib<3, Binding, T, Semantic, true>
01488 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator()(int s0, int s1, int s2) const
01489 {
01490   return ShAttrib<3, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(4, s0, s1, s2), this->m_neg);
01491 }
01492 
01493 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01494 ShAttrib<4, Binding, T, Semantic, true>
01495 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator()(int s0, int s1, int s2, int s3) const
01496 {
01497   return ShAttrib<4, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(4, s0, s1, s2, s3), this->m_neg);
01498 }
01499 
01500 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01501 template<int N2>
01502 ShAttrib<N2, Binding, T, Semantic, true>
01503 ShAttrib<4, Binding, T, Semantic, Swizzled>::swiz(int indices[]) const
01504 {
01505   return ShAttrib<N2, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(4, N2, indices), this->m_neg);
01506 }
01507 
01508 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01509 ShAttrib<1, Binding, T, Semantic, true>
01510 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator[](int s0) const
01511 {
01512   return ShAttrib<1, Binding, T, Semantic, true>(this->m_node, this->m_swizzle * ShSwizzle(4, s0), this->m_neg);
01513 }
01514 
01515 template<ShBindingType Binding, typename T, ShSemanticType Semantic, bool Swizzled>
01516 ShAttrib<4, Binding, T, Semantic, Swizzled>
01517 ShAttrib<4, Binding, T, Semantic, Swizzled>::operator-() const
01518 {
01519   return ShAttrib<4, Binding, T, Semantic, Swizzled>(this->m_node, this->m_swizzle, !this->m_neg);
01520 }
01521 
01522 
01523 } // namespace SH
01524 
01525 #endif // SH_SHATTRIBIMPL_HPP

Generated on Thu Apr 21 17:32:46 2005 for Sh by  doxygen 1.4.2