intrinsic_geometric.hpp

00001 
00002 // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
00004 // Created : 2009-05-08
00005 // Updated : 2009-05-08
00006 // Licence : This source is under MIT License
00007 // File    : glm/core/intrinsic_geometric.hpp
00009 
00010 #ifndef glm_core_intrinsic_geometric
00011 #define glm_core_intrinsic_geometric
00012 
00013 #include "setup.hpp"
00014 
00015 #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2)
00016 #       error "SSE2 instructions not supported or enabled"
00017 #else
00018 
00019 #include "intrinsic_common.hpp"
00020 
00021 namespace glm{
00022 namespace detail
00023 {
00024         //length
00025         __m128 sse_len_ps(__m128 x);
00026 
00027         //distance
00028         __m128 sse_dst_ps(__m128 p0, __m128 p1);
00029 
00030         //dot
00031         __m128 sse_dot_ps(__m128 v1, __m128 v2);
00032 
00033         // SSE1
00034         __m128 sse_dot_ss(__m128 v1, __m128 v2);
00035 
00036         //cross
00037         __m128 sse_xpd_ps(__m128 v1, __m128 v2);
00038 
00039         //normalize
00040         __m128 sse_nrm_ps(__m128 v);
00041 
00042         //faceforward
00043         __m128 sse_ffd_ps(__m128 N, __m128 I, __m128 Nref);
00044 
00045         //reflect
00046         __m128 sse_rfe_ps(__m128 I, __m128 N);
00047 
00048         //refract
00049         __m128 sse_rfa_ps(__m128 I, __m128 N, __m128 eta);
00050 
00051 }//namespace detail
00052 }//namespace glm
00053 
00054 #include "intrinsic_geometric.inl"
00055 
00056 #endif//GLM_ARCH
00057 #endif//glm_core_intrinsic_geometric