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

Generated on Wed Jun 15 18:12:38 2005 for Sh by  doxygen 1.4.3-20050530