handed_coordinate_space.hpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /// @ref gtx_handed_coordinate_space
  2. /// @file glm/gtx/handed_coordinate_space.hpp
  3. ///
  4. /// @see core (dependence)
  5. ///
  6. /// @defgroup gtx_handed_coordinate_space GLM_GTX_handed_coordinate_space
  7. /// @ingroup gtx
  8. ///
  9. /// Include <glm/gtx/handed_coordinate_system.hpp> to use the features of this extension.
  10. ///
  11. /// To know if a set of three basis vectors defines a right or left-handed coordinate system.
  12. #pragma once
  13. // Dependency:
  14. #include "../glm.hpp"
  15. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  16. # ifndef GLM_ENABLE_EXPERIMENTAL
  17. # pragma message("GLM: GLM_GTX_handed_coordinate_space is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
  18. # else
  19. # pragma message("GLM: GLM_GTX_handed_coordinate_space extension included")
  20. # endif
  21. #endif
  22. namespace glm
  23. {
  24. /// @addtogroup gtx_handed_coordinate_space
  25. /// @{
  26. //! Return if a trihedron right handed or not.
  27. //! From GLM_GTX_handed_coordinate_space extension.
  28. template<typename T, qualifier Q>
  29. GLM_FUNC_DECL bool rightHanded(
  30. vec<3, T, Q> const& tangent,
  31. vec<3, T, Q> const& binormal,
  32. vec<3, T, Q> const& normal);
  33. //! Return if a trihedron left handed or not.
  34. //! From GLM_GTX_handed_coordinate_space extension.
  35. template<typename T, qualifier Q>
  36. GLM_FUNC_DECL bool leftHanded(
  37. vec<3, T, Q> const& tangent,
  38. vec<3, T, Q> const& binormal,
  39. vec<3, T, Q> const& normal);
  40. /// @}
  41. }// namespace glm
  42. #include "handed_coordinate_space.inl"