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

ShLibGeometry.hpp

00001 // Sh: A GPU metaprogramming language.
00002 //
00003 // Copyright (c) 2003 University of Waterloo Computer Graphics Laboratory
00004 // Project administrator: Michael D. McCool
00005 // Authors: Zheng Qin, Stefanus Du Toit, Kevin Moule, Tiberiu S. Popa,
00006 //          Michael D. McCool
00007 // 
00008 // This software is provided 'as-is', without any express or implied
00009 // warranty. In no event will the authors be held liable for any damages
00010 // arising from the use of this software.
00011 // 
00012 // Permission is granted to anyone to use this software for any purpose,
00013 // including commercial applications, and to alter it and redistribute it
00014 // freely, subject to the following restrictions:
00015 // 
00016 // 1. The origin of this software must not be misrepresented; you must
00017 // not claim that you wrote the original software. If you use this
00018 // software in a product, an acknowledgment in the product documentation
00019 // would be appreciated but is not required.
00020 // 
00021 // 2. Altered source versions must be plainly marked as such, and must
00022 // not be misrepresented as being the original software.
00023 // 
00024 // 3. This notice may not be removed or altered from any source
00025 // distribution.
00027 #ifndef SHLIBGEOMETRY_HPP
00028 #define SHLIBGEOMETRY_HPP
00029 
00030 #include "ShGeneric.hpp"
00031 #include "ShLib.hpp"
00032 
00033 #ifndef WIN32
00034 namespace SH {
00035 
00047 template<typename T1, typename T2>
00048 ShGeneric<3, CT1T2> 
00049 cross(const ShGeneric<3, T1>& left, const ShGeneric<3, T2>& right);
00050 
00052 template<int N, typename T1, typename T2>
00053 ShGeneric<3, CT1T2> 
00054 operator^(const ShGeneric<3, T1>& left, const ShGeneric<3, T2>& right);
00055 
00059 template<int N, typename T>
00060 ShGeneric<N, T> normalize(const ShGeneric<N, T>& var);
00061 
00065 template<int N, typename T1, typename T2>
00066 ShGeneric<N, CT1T2> 
00067 reflect(const ShGeneric<N, T1>& a, const ShGeneric<N, T2>& b);
00068 
00072 template<int N, typename T1, typename T2, typename T3>
00073 ShGeneric<N, CT1T2T3> 
00074 refract(const ShGeneric<N, T1>& a, const ShGeneric<N, T2>& b, const ShGeneric<1, T3>& c);
00075 
00080 template<int N, typename T1, typename T2>
00081 ShGeneric<N, CT1T2> 
00082 faceforward(const ShGeneric<N, T1>& a, const ShGeneric<N, T2>& b);
00083 
00091 template<typename T1, typename T2, typename T3>
00092 ShGeneric<4, CT1T2T3> 
00093 lit(const ShGeneric<1, T1>& a,
00094     const ShGeneric<1, T2>& b,
00095     const ShGeneric<1, T3>& c);
00096 
00099 template<int N, typename T1, typename T2>
00100 ShGeneric<1, CT1T2> 
00101 dot(const ShGeneric<N, T1>& left, const ShGeneric<N, T2>& right);
00102 
00103 template<int N, typename T1, typename T2>
00104 ShGeneric<1, CT1T2> 
00105 operator|(const ShGeneric<N, T1>& left, const ShGeneric<N, T2>& right);
00106 
00107 SH_SHLIB_CONST_N_OP_RETSIZE_BOTH_DECL(dot, 1);
00108 
00114 template<int N, typename T>
00115 ShGeneric<1, T> distance(const ShGeneric<N, T>& a, const ShGeneric<N, T>& b);
00116 
00120 template<int N, typename T>
00121 ShGeneric<1, T> distance_1(const ShGeneric<N, T>& a, const ShGeneric<N, T>& b);
00122 
00126 template<int N, typename T>
00127 ShGeneric<1, T> distance_inf(const ShGeneric<N, T>& a, const ShGeneric<N, T>& b);
00128 
00132 template<int N, typename T>
00133 ShGeneric<1, T> length(const ShGeneric<N, T>& a);
00134 
00135 }
00136 #endif
00137 
00138 #include "ShLibGeometryImpl.hpp"
00139 
00140 #endif

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