PSMoveService
func_geometric.hpp
Go to the documentation of this file.
1 
36 #ifndef glm_core_func_geometric
37 #define glm_core_func_geometric GLM_VERSION
38 
39 namespace glm
40 {
43 
50  template <typename genType>
51  typename genType::value_type length(
52  genType const & x);
53 
60  template <typename genType>
61  typename genType::value_type distance(
62  genType const & p0,
63  genType const & p1);
64 
71  template <typename genType>
72  typename genType::value_type dot(
73  genType const & x,
74  genType const & y);
75 
82  template <typename valType>
83  detail::tvec3<valType> cross(
84  detail::tvec3<valType> const & x,
85  detail::tvec3<valType> const & y);
86 
91  template <typename genType>
92  genType normalize(
93  genType const & x);
94 
101  template <typename genType>
102  genType faceforward(
103  genType const & N,
104  genType const & I,
105  genType const & Nref);
106 
114  template <typename genType>
115  genType reflect(
116  genType const & I,
117  genType const & N);
118 
127  template <typename genType>
128  genType refract(
129  genType const & I,
130  genType const & N,
131  typename genType::value_type const & eta);
132 
134 }//namespace glm
135 
136 #include "func_geometric.inl"
137 
138 #endif//glm_core_func_geometric
genType::value_type dot(genType const &x, genType const &y)
Returns the dot product of x and y, i.e., result = x * y.
Definition: func_geometric.inl:134
genType refract(genType const &I, genType const &N, typename genType::value_type const &eta)
For the incident vector I and surface normal N, and the ratio of indices of refraction eta...
Definition: func_geometric.inl:307
genType reflect(genType const &I, genType const &N)
For the incident vector I and surface orientation N, returns the reflection direction : result = I - ...
Definition: func_geometric.inl:277
Definition: _detail.hpp:38
genType normalize(genType const &x)
Returns a vector in the same direction as x but with length of 1.
Definition: func_geometric.inl:216
genType::value_type distance(genType const &p0, genType const &p1)
Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
Definition: func_geometric.inl:85
OpenGL Mathematics (glm.g-truc.net)
genType faceforward(genType const &N, genType const &I, genType const &Nref)
If dot(Nref, I) < 0.0, return N, otherwise, return -N.
Definition: func_geometric.inl:265
genType::value_type length(genType const &x)
Returns the length of x, i.e., sqrt(x * x).
Definition: func_geometric.inl:36
detail::tvec3< valType > cross(detail::tvec3< valType > const &x, detail::tvec3< valType > const &y)
Returns the cross product of x and y.