normal.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /// @ref gtx_normal
  2. /// @file glm/gtx/normal.hpp
  3. ///
  4. /// @see core (dependence)
  5. /// @see gtx_extented_min_max (dependence)
  6. ///
  7. /// @defgroup gtx_normal GLM_GTX_normal
  8. /// @ingroup gtx
  9. ///
  10. /// Include <glm/gtx/normal.hpp> to use the features of this extension.
  11. ///
  12. /// Compute the normal of a triangle.
  13. #pragma once
  14. // Dependency:
  15. #include "../glm.hpp"
  16. #ifndef GLM_ENABLE_EXPERIMENTAL
  17. # error "GLM: GLM_GTX_normal 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. #elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  19. # pragma message("GLM: GLM_GTX_normal extension included")
  20. #endif
  21. namespace glm
  22. {
  23. /// @addtogroup gtx_normal
  24. /// @{
  25. /// Computes triangle normal from triangle points.
  26. ///
  27. /// @see gtx_normal
  28. template<typename T, qualifier Q>
  29. GLM_FUNC_DECL vec<3, T, Q> triangleNormal(vec<3, T, Q> const& p1, vec<3, T, Q> const& p2, vec<3, T, Q> const& p3);
  30. /// @}
  31. }//namespace glm
  32. #include "normal.inl"