norm.hpp
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 #ifndef GLM_GTX_norm
00040 #define GLM_GTX_norm 50
00041 
00042 // Dependency:
00043 #include "../glm.hpp"
00044 #include "../gtx/quaternion.hpp"
00045 
00046 #if(defined(GLM_MESSAGES) && !defined(glm_ext))
00047 #       pragma message("GLM: GLM_GTX_norm extension included")
00048 #endif
00049 
00050 namespace glm
00051 {
00054 
00057         template <typename T> 
00058         T length2(
00059                 const T x);
00060 
00063         template <typename T> 
00064         T length2(
00065                 const detail::tvec2<T> & x);
00066 
00069         template <typename T>
00070         T length2(
00071                 const detail::tvec3<T>& x);
00072                 
00075         template <typename T> 
00076         T length2(
00077                 const detail::tvec4<T>& x);
00078                 
00081         template <typename T>
00082         T length2(
00083                 const detail::tquat<T>& q);
00084 
00087         template <typename T>
00088         T distance2(
00089                 const T p0, 
00090                 const T p1);
00091                 
00094         template <typename T> 
00095         T distance2(
00096                 const detail::tvec2<T>& p0, 
00097                 const detail::tvec2<T>& p1);
00098 
00101         template <typename T>
00102         T distance2(
00103                 const detail::tvec3<T>& p0,
00104                 const detail::tvec3<T>& p1);
00105 
00108         template <typename T>
00109         T distance2(
00110                 const detail::tvec4<T>& p0, 
00111                 const detail::tvec4<T>& p1);
00112 
00115         template <typename T>
00116         T l1Norm(
00117                 const detail::tvec3<T>& x,
00118                 const detail::tvec3<T>& y);
00119                 
00122         template <typename T> 
00123         T l1Norm(
00124                 const detail::tvec3<T>& v);
00125                 
00128         template <typename T> 
00129         T l2Norm(
00130                 const detail::tvec3<T>& x, 
00131                 const detail::tvec3<T>& y);
00132                 
00135         template <typename T> 
00136         T l2Norm(
00137                 const detail::tvec3<T>& x);
00138                 
00141         template <typename T> 
00142         T lxNorm(
00143                 const detail::tvec3<T>& x,
00144                 const detail::tvec3<T>& y,
00145                 unsigned int Depth);
00146 
00149         template <typename T>
00150         T lxNorm(
00151                 const detail::tvec3<T>& x,
00152                 unsigned int Depth);
00153 
00155 }//namespace glm
00156 
00157 #include "norm.inl"
00158 
00159 #endif//GLM_GTX_norm