9
3

normal.hpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  17. # ifndef GLM_ENABLE_EXPERIMENTAL
  18. # pragma message("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.")
  19. # else
  20. # pragma message("GLM: GLM_GTX_normal extension included")
  21. # endif
  22. #endif
  23. namespace glm
  24. {
  25. /// @addtogroup gtx_normal
  26. /// @{
  27. /// Computes triangle normal from triangle points.
  28. ///
  29. /// @see gtx_normal
  30. template<typename T, qualifier Q>
  31. 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);
  32. /// @}
  33. }//namespace glm
  34. #include "normal.inl"