36 #ifndef glm_core_func_geometric 37 #define glm_core_func_geometric GLM_VERSION 50 template <
typename genType>
51 typename genType::value_type
length(
60 template <
typename genType>
61 typename genType::value_type
distance(
71 template <
typename genType>
72 typename genType::value_type
dot(
82 template <
typename valType>
83 detail::tvec3<valType>
cross(
84 detail::tvec3<valType>
const & x,
85 detail::tvec3<valType>
const & y);
91 template <
typename genType>
101 template <
typename genType>
105 genType
const & Nref);
114 template <
typename genType>
127 template <
typename genType>
131 typename genType::value_type
const & eta);
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.