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

ShColorImpl.hpp

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

Generated on Mon Jan 24 18:36:30 2005 for Sh by  doxygen 1.4.1