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 2003-2005 Serious Hack Inc.
00004 // 
00005 // This software is provided 'as-is', without any express or implied
00006 // warranty. In no event will the authors be held liable for any damages
00007 // arising from the use of this software.
00008 // 
00009 // Permission is granted to anyone to use this software for any purpose,
00010 // including commercial applications, and to alter it and redistribute it
00011 // freely, subject to the following restrictions:
00012 // 
00013 // 1. The origin of this software must not be misrepresented; you must
00014 // not claim that you wrote the original software. If you use this
00015 // software in a product, an acknowledgment in the product documentation
00016 // would be appreciated but is not required.
00017 // 
00018 // 2. Altered source versions must be plainly marked as such, and must
00019 // not be misrepresented as being the original software.
00020 // 
00021 // 3. This notice may not be removed or altered from any source
00022 // distribution.
00024 #ifndef SHLIBGEOMETRY_HPP
00025 #define SHLIBGEOMETRY_HPP
00026 
00027 #include "ShGeneric.hpp"
00028 #include "ShLib.hpp"
00029 
00030 #ifndef WIN32
00031 namespace SH {
00032 
00043 template<typename T1, typename T2>
00044 ShGeneric<3, CT1T2> 
00045 cross(const ShGeneric<3, T1>& left, const ShGeneric<3, T2>& right);
00046 
00048 template<int N, typename T1, typename T2>
00049 ShGeneric<3, CT1T2> 
00050 operator^(const ShGeneric<3, T1>& left, const ShGeneric<3, T2>& right);
00051 
00055 template<int N, typename T>
00056 ShGeneric<N, T> normalize(const ShGeneric<N, T>& var);
00057 
00061 template<int N, typename T1, typename T2>
00062 ShGeneric<N, CT1T2> 
00063 reflect(const ShGeneric<N, T1>& a, const ShGeneric<N, T2>& b);
00064 
00068 template<int N, typename T1, typename T2, typename T3>
00069 ShGeneric<N, CT1T2T3> 
00070 refract(const ShGeneric<N, T1>& a, const ShGeneric<N, T2>& b, const ShGeneric<1, T3>& c);
00071 
00076 template<int N, typename T1, typename T2>
00077 ShGeneric<N, CT1T2> 
00078 faceforward(const ShGeneric<N, T1>& a, const ShGeneric<N, T2>& b);
00079 
00087 template<typename T1, typename T2, typename T3>
00088 ShGeneric<4, CT1T2T3> 
00089 lit(const ShGeneric<1, T1>& a,
00090     const ShGeneric<1, T2>& b,
00091     const ShGeneric<1, T3>& c);
00092 
00095 template<int N, typename T1, typename T2>
00096 ShGeneric<1, CT1T2> 
00097 dot(const ShGeneric<N, T1>& left, const ShGeneric<N, T2>& right);
00098 
00099 template<int N, typename T1, typename T2>
00100 ShGeneric<1, CT1T2> 
00101 operator|(const ShGeneric<N, T1>& left, const ShGeneric<N, T2>& right);
00102 
00103 SH_SHLIB_CONST_N_OP_RETSIZE_BOTH_DECL(dot, 1);
00104 
00110 template<int N, typename T>
00111 ShGeneric<1, T> distance(const ShGeneric<N, T>& a, const ShGeneric<N, T>& b);
00112 
00116 template<int N, typename T>
00117 ShGeneric<1, T> distance_1(const ShGeneric<N, T>& a, const ShGeneric<N, T>& b);
00118 
00122 template<int N, typename T>
00123 ShGeneric<1, T> distance_inf(const ShGeneric<N, T>& a, const ShGeneric<N, T>& b);
00124 
00128 template<int N, typename T>
00129 ShGeneric<1, T> length(const ShGeneric<N, T>& a);
00130 
00134 template<int N, typename T>
00135 ShGeneric<1, T> length_1(const ShGeneric<N, T>& a);
00136 
00140 template<int N, typename T>
00141 ShGeneric<1, T> length_inf(const ShGeneric<N, T>& a);
00142 
00143 }
00144 #endif
00145 
00146 #include "ShLibGeometryImpl.hpp"
00147 
00148 #endif

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