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