diff options
Diffstat (limited to 'depedencies/include/glm/gtx/handed_coordinate_space.inl')
-rw-r--r-- | depedencies/include/glm/gtx/handed_coordinate_space.inl | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/depedencies/include/glm/gtx/handed_coordinate_space.inl b/depedencies/include/glm/gtx/handed_coordinate_space.inl new file mode 100644 index 0000000..2e55653 --- /dev/null +++ b/depedencies/include/glm/gtx/handed_coordinate_space.inl @@ -0,0 +1,27 @@ +/// @ref gtx_handed_coordinate_space +/// @file glm/gtx/handed_coordinate_space.inl + +namespace glm +{ + template <typename T, precision P> + GLM_FUNC_QUALIFIER bool rightHanded + ( + tvec3<T, P> const & tangent, + tvec3<T, P> const & binormal, + tvec3<T, P> const & normal + ) + { + return dot(cross(normal, tangent), binormal) > T(0); + } + + template <typename T, precision P> + GLM_FUNC_QUALIFIER bool leftHanded + ( + tvec3<T, P> const & tangent, + tvec3<T, P> const & binormal, + tvec3<T, P> const & normal + ) + { + return dot(cross(normal, tangent), binormal) < T(0); + } +}//namespace glm |