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

ShPosition.hpp

00001 // WARNING - DO NOT EDIT THIS FILE: 00002 // This file was automatically generated from scripts/ShPosition.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_SHPOSITION_HPP 00035 #define SH_SHPOSITION_HPP 00036 00037 #include "ShPoint.hpp" 00038 namespace SH { 00039 00048 template<int N, ShBindingType Binding, typename T=float, bool Swizzled=false> 00049 class ShPosition : public ShPoint<N, Binding, T, Swizzled> { 00050 public: 00051 ShPosition(); 00052 ShPosition(const ShGeneric<N, T>& other); 00053 ShPosition(const ShPosition<N, Binding, T, Swizzled>& other); 00054 ShPosition(const ShVariableNodePtr& node, const ShSwizzle& swizzle, bool neg); 00055 explicit ShPosition(T data[N]); 00056 00057 ~ShPosition(); 00058 00059 ShPosition& operator=(const ShGeneric<N, T>& other); 00060 ShPosition& operator=(const ShPosition<N, Binding, T, Swizzled>& other); 00061 00062 ShPosition& operator=(const ShProgram& prg); 00063 00064 ShPosition& operator+=(const ShGeneric<N, T>& right); 00065 ShPosition& operator-=(const ShGeneric<N, T>& right); 00066 ShPosition& operator*=(const ShGeneric<N, T>& right); 00067 ShPosition& operator/=(const ShGeneric<N, T>& right); 00068 ShPosition& operator%=(const ShGeneric<N, T>& right); 00069 ShPosition& operator*=(T); 00070 ShPosition& operator/=(T); 00071 ShPosition& operator%=(T); 00072 ShPosition& operator+=(T); 00073 ShPosition& operator-=(T); 00074 ShPosition& operator+=(const ShGeneric<1, T>&); 00075 ShPosition& operator-=(const ShGeneric<1, T>&); 00076 ShPosition& operator*=(const ShGeneric<1, T>&); 00077 ShPosition& operator/=(const ShGeneric<1, T>&); 00078 ShPosition& operator%=(const ShGeneric<1, T>&); 00079 ShPosition<1, Binding, T, true> operator()(int) const; 00080 ShPosition<2, Binding, T, true> operator()(int, int) const; 00081 ShPosition<3, Binding, T, true> operator()(int, int, int) const; 00082 ShPosition<4, Binding, T, true> operator()(int, int, int, int) const; 00083 ShPosition<1, Binding, T, true> operator[](int) const; 00084 00085 template<int N2> 00086 ShPosition<N2, Binding, T, true> swiz(int indices[]) const; 00087 00088 ShPosition operator-() const; 00089 typedef T ValueType; 00090 static const int typesize = N; 00091 static const ShBindingType binding_type = Binding; 00092 static const ShSemanticType semantic_type = SH_POSITION; 00093 00094 typedef ShPosition<N, SH_INPUT, T> InputType; 00095 typedef ShPosition<N, SH_OUTPUT, T> OutputType; 00096 typedef ShPosition<N, SH_INOUT, T> InOutType; 00097 typedef ShPosition<N, SH_TEMP, T> TempType; 00098 typedef ShPosition<N, SH_CONST, T> ConstType; 00099 private: 00100 typedef ShPoint<N, Binding, T, Swizzled> ParentType; 00101 }; 00102 00103 template<ShBindingType Binding, typename T, bool Swizzled> 00104 class ShPosition<1, Binding, T, Swizzled> : public ShPoint<1, Binding, T, Swizzled> { 00105 public: 00106 ShPosition(); 00107 ShPosition(const ShGeneric<1, T>& other); 00108 ShPosition(const ShPosition<1, Binding, T, Swizzled>& other); 00109 ShPosition(const ShVariableNodePtr& node, const ShSwizzle& swizzle, bool neg); 00110 explicit ShPosition(T data[1]); 00111 00112 ShPosition(T); 00113 00114 ~ShPosition(); 00115 00116 ShPosition& operator=(const ShGeneric<1, T>& other); 00117 ShPosition& operator=(const ShPosition<1, Binding, T, Swizzled>& other); 00118 00119 ShPosition& operator=(T other); 00120 00121 ShPosition& operator=(const ShProgram& prg); 00122 00123 ShPosition& operator+=(const ShGeneric<1, T>& right); 00124 ShPosition& operator-=(const ShGeneric<1, T>& right); 00125 ShPosition& operator*=(const ShGeneric<1, T>& right); 00126 ShPosition& operator/=(const ShGeneric<1, T>& right); 00127 ShPosition& operator%=(const ShGeneric<1, T>& right); 00128 ShPosition& operator*=(T); 00129 ShPosition& operator/=(T); 00130 ShPosition& operator%=(T); 00131 ShPosition& operator+=(T); 00132 ShPosition& operator-=(T); 00133 ShPosition<1, Binding, T, true> operator()(int) const; 00134 ShPosition<2, Binding, T, true> operator()(int, int) const; 00135 ShPosition<3, Binding, T, true> operator()(int, int, int) const; 00136 ShPosition<4, Binding, T, true> operator()(int, int, int, int) const; 00137 ShPosition<1, Binding, T, true> operator[](int) const; 00138 00139 template<int N2> 00140 ShPosition<N2, Binding, T, true> swiz(int indices[]) const; 00141 00142 ShPosition operator-() const; 00143 typedef T ValueType; 00144 static const int typesize = 1; 00145 static const ShBindingType binding_type = Binding; 00146 static const ShSemanticType semantic_type = SH_POSITION; 00147 00148 typedef ShPosition<1, SH_INPUT, T> InputType; 00149 typedef ShPosition<1, SH_OUTPUT, T> OutputType; 00150 typedef ShPosition<1, SH_INOUT, T> InOutType; 00151 typedef ShPosition<1, SH_TEMP, T> TempType; 00152 typedef ShPosition<1, SH_CONST, T> ConstType; 00153 private: 00154 typedef ShPoint<1, Binding, T, Swizzled> ParentType; 00155 }; 00156 00157 template<ShBindingType Binding, typename T, bool Swizzled> 00158 class ShPosition<2, Binding, T, Swizzled> : public ShPoint<2, Binding, T, Swizzled> { 00159 public: 00160 ShPosition(); 00161 ShPosition(const ShGeneric<2, T>& other); 00162 ShPosition(const ShPosition<2, Binding, T, Swizzled>& other); 00163 ShPosition(const ShVariableNodePtr& node, const ShSwizzle& swizzle, bool neg); 00164 explicit ShPosition(T data[2]); 00165 00166 ShPosition(T, T); 00167 ShPosition(const ShGeneric<1, T>&, const ShGeneric<1, T>&); 00168 00169 ~ShPosition(); 00170 00171 ShPosition& operator=(const ShGeneric<2, T>& other); 00172 ShPosition& operator=(const ShPosition<2, Binding, T, Swizzled>& other); 00173 00174 ShPosition& operator=(const ShProgram& prg); 00175 00176 ShPosition& operator+=(const ShGeneric<2, T>& right); 00177 ShPosition& operator-=(const ShGeneric<2, T>& right); 00178 ShPosition& operator*=(const ShGeneric<2, T>& right); 00179 ShPosition& operator/=(const ShGeneric<2, T>& right); 00180 ShPosition& operator%=(const ShGeneric<2, T>& right); 00181 ShPosition& operator*=(T); 00182 ShPosition& operator/=(T); 00183 ShPosition& operator%=(T); 00184 ShPosition& operator+=(T); 00185 ShPosition& operator-=(T); 00186 ShPosition& operator+=(const ShGeneric<1, T>&); 00187 ShPosition& operator-=(const ShGeneric<1, T>&); 00188 ShPosition& operator*=(const ShGeneric<1, T>&); 00189 ShPosition& operator/=(const ShGeneric<1, T>&); 00190 ShPosition& operator%=(const ShGeneric<1, T>&); 00191 ShPosition<1, Binding, T, true> operator()(int) const; 00192 ShPosition<2, Binding, T, true> operator()(int, int) const; 00193 ShPosition<3, Binding, T, true> operator()(int, int, int) const; 00194 ShPosition<4, Binding, T, true> operator()(int, int, int, int) const; 00195 ShPosition<1, Binding, T, true> operator[](int) const; 00196 00197 template<int N2> 00198 ShPosition<N2, Binding, T, true> swiz(int indices[]) const; 00199 00200 ShPosition operator-() const; 00201 typedef T ValueType; 00202 static const int typesize = 2; 00203 static const ShBindingType binding_type = Binding; 00204 static const ShSemanticType semantic_type = SH_POSITION; 00205 00206 typedef ShPosition<2, SH_INPUT, T> InputType; 00207 typedef ShPosition<2, SH_OUTPUT, T> OutputType; 00208 typedef ShPosition<2, SH_INOUT, T> InOutType; 00209 typedef ShPosition<2, SH_TEMP, T> TempType; 00210 typedef ShPosition<2, SH_CONST, T> ConstType; 00211 private: 00212 typedef ShPoint<2, Binding, T, Swizzled> ParentType; 00213 }; 00214 00215 template<ShBindingType Binding, typename T, bool Swizzled> 00216 class ShPosition<3, Binding, T, Swizzled> : public ShPoint<3, Binding, T, Swizzled> { 00217 public: 00218 ShPosition(); 00219 ShPosition(const ShGeneric<3, T>& other); 00220 ShPosition(const ShPosition<3, Binding, T, Swizzled>& other); 00221 ShPosition(const ShVariableNodePtr& node, const ShSwizzle& swizzle, bool neg); 00222 explicit ShPosition(T data[3]); 00223 00224 ShPosition(T, T, T); 00225 ShPosition(const ShGeneric<1, T>&, const ShGeneric<1, T>&, const ShGeneric<1, T>&); 00226 00227 ~ShPosition(); 00228 00229 ShPosition& operator=(const ShGeneric<3, T>& other); 00230 ShPosition& operator=(const ShPosition<3, Binding, T, Swizzled>& other); 00231 00232 ShPosition& operator=(const ShProgram& prg); 00233 00234 ShPosition& operator+=(const ShGeneric<3, T>& right); 00235 ShPosition& operator-=(const ShGeneric<3, T>& right); 00236 ShPosition& operator*=(const ShGeneric<3, T>& right); 00237 ShPosition& operator/=(const ShGeneric<3, T>& right); 00238 ShPosition& operator%=(const ShGeneric<3, T>& right); 00239 ShPosition& operator*=(T); 00240 ShPosition& operator/=(T); 00241 ShPosition& operator%=(T); 00242 ShPosition& operator+=(T); 00243 ShPosition& operator-=(T); 00244 ShPosition& operator+=(const ShGeneric<1, T>&); 00245 ShPosition& operator-=(const ShGeneric<1, T>&); 00246 ShPosition& operator*=(const ShGeneric<1, T>&); 00247 ShPosition& operator/=(const ShGeneric<1, T>&); 00248 ShPosition& operator%=(const ShGeneric<1, T>&); 00249 ShPosition<1, Binding, T, true> operator()(int) const; 00250 ShPosition<2, Binding, T, true> operator()(int, int) const; 00251 ShPosition<3, Binding, T, true> operator()(int, int, int) const; 00252 ShPosition<4, Binding, T, true> operator()(int, int, int, int) const; 00253 ShPosition<1, Binding, T, true> operator[](int) const; 00254 00255 template<int N2> 00256 ShPosition<N2, Binding, T, true> swiz(int indices[]) const; 00257 00258 ShPosition operator-() const; 00259 typedef T ValueType; 00260 static const int typesize = 3; 00261 static const ShBindingType binding_type = Binding; 00262 static const ShSemanticType semantic_type = SH_POSITION; 00263 00264 typedef ShPosition<3, SH_INPUT, T> InputType; 00265 typedef ShPosition<3, SH_OUTPUT, T> OutputType; 00266 typedef ShPosition<3, SH_INOUT, T> InOutType; 00267 typedef ShPosition<3, SH_TEMP, T> TempType; 00268 typedef ShPosition<3, SH_CONST, T> ConstType; 00269 private: 00270 typedef ShPoint<3, Binding, T, Swizzled> ParentType; 00271 }; 00272 00273 template<ShBindingType Binding, typename T, bool Swizzled> 00274 class ShPosition<4, Binding, T, Swizzled> : public ShPoint<4, Binding, T, Swizzled> { 00275 public: 00276 ShPosition(); 00277 ShPosition(const ShGeneric<4, T>& other); 00278 ShPosition(const ShPosition<4, Binding, T, Swizzled>& other); 00279 ShPosition(const ShVariableNodePtr& node, const ShSwizzle& swizzle, bool neg); 00280 explicit ShPosition(T data[4]); 00281 00282 ShPosition(T, T, T, T); 00283 ShPosition(const ShGeneric<1, T>&, const ShGeneric<1, T>&, const ShGeneric<1, T>&, const ShGeneric<1, T>&); 00284 00285 ~ShPosition(); 00286 00287 ShPosition& operator=(const ShGeneric<4, T>& other); 00288 ShPosition& operator=(const ShPosition<4, Binding, T, Swizzled>& other); 00289 00290 ShPosition& operator=(const ShProgram& prg); 00291 00292 ShPosition& operator+=(const ShGeneric<4, T>& right); 00293 ShPosition& operator-=(const ShGeneric<4, T>& right); 00294 ShPosition& operator*=(const ShGeneric<4, T>& right); 00295 ShPosition& operator/=(const ShGeneric<4, T>& right); 00296 ShPosition& operator%=(const ShGeneric<4, T>& right); 00297 ShPosition& operator*=(T); 00298 ShPosition& operator/=(T); 00299 ShPosition& operator%=(T); 00300 ShPosition& operator+=(T); 00301 ShPosition& operator-=(T); 00302 ShPosition& operator+=(const ShGeneric<1, T>&); 00303 ShPosition& operator-=(const ShGeneric<1, T>&); 00304 ShPosition& operator*=(const ShGeneric<1, T>&); 00305 ShPosition& operator/=(const ShGeneric<1, T>&); 00306 ShPosition& operator%=(const ShGeneric<1, T>&); 00307 ShPosition<1, Binding, T, true> operator()(int) const; 00308 ShPosition<2, Binding, T, true> operator()(int, int) const; 00309 ShPosition<3, Binding, T, true> operator()(int, int, int) const; 00310 ShPosition<4, Binding, T, true> operator()(int, int, int, int) const; 00311 ShPosition<1, Binding, T, true> operator[](int) const; 00312 00313 template<int N2> 00314 ShPosition<N2, Binding, T, true> swiz(int indices[]) const; 00315 00316 ShPosition operator-() const; 00317 typedef T ValueType; 00318 static const int typesize = 4; 00319 static const ShBindingType binding_type = Binding; 00320 static const ShSemanticType semantic_type = SH_POSITION; 00321 00322 typedef ShPosition<4, SH_INPUT, T> InputType; 00323 typedef ShPosition<4, SH_OUTPUT, T> OutputType; 00324 typedef ShPosition<4, SH_INOUT, T> InOutType; 00325 typedef ShPosition<4, SH_TEMP, T> TempType; 00326 typedef ShPosition<4, SH_CONST, T> ConstType; 00327 private: 00328 typedef ShPoint<4, Binding, T, Swizzled> ParentType; 00329 }; 00330 00331 typedef ShPosition<1, SH_INPUT, float> ShInputPosition1f; 00332 typedef ShPosition<1, SH_OUTPUT, float> ShOutputPosition1f; 00333 typedef ShPosition<1, SH_INOUT, float> ShInOutPosition1f; 00334 typedef ShPosition<1, SH_TEMP, float> ShPosition1f; 00335 typedef ShPosition<1, SH_CONST, float> ShConstPosition1f; 00336 typedef ShPosition<2, SH_INPUT, float> ShInputPosition2f; 00337 typedef ShPosition<2, SH_OUTPUT, float> ShOutputPosition2f; 00338 typedef ShPosition<2, SH_INOUT, float> ShInOutPosition2f; 00339 typedef ShPosition<2, SH_TEMP, float> ShPosition2f; 00340 typedef ShPosition<2, SH_CONST, float> ShConstPosition2f; 00341 typedef ShPosition<3, SH_INPUT, float> ShInputPosition3f; 00342 typedef ShPosition<3, SH_OUTPUT, float> ShOutputPosition3f; 00343 typedef ShPosition<3, SH_INOUT, float> ShInOutPosition3f; 00344 typedef ShPosition<3, SH_TEMP, float> ShPosition3f; 00345 typedef ShPosition<3, SH_CONST, float> ShConstPosition3f; 00346 typedef ShPosition<4, SH_INPUT, float> ShInputPosition4f; 00347 typedef ShPosition<4, SH_OUTPUT, float> ShOutputPosition4f; 00348 typedef ShPosition<4, SH_INOUT, float> ShInOutPosition4f; 00349 typedef ShPosition<4, SH_TEMP, float> ShPosition4f; 00350 typedef ShPosition<4, SH_CONST, float> ShConstPosition4f; 00351 00352 } // namespace SH 00353 #include "ShPositionImpl.hpp" 00354 00355 #endif // SH_SHPOSITION_HPP

Generated on Mon Oct 18 14:17:40 2004 for Sh by doxygen 1.3.7