• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /// @ref gtx_gradient_paint
2 /// @file glm/gtx/gradient_paint.hpp
3 ///
4 /// @see core (dependence)
5 /// @see gtx_optimum_pow (dependence)
6 ///
7 /// @defgroup gtx_gradient_paint GLM_GTX_gradient_paint
8 /// @ingroup gtx
9 ///
10 /// @brief Functions that return the color of procedural gradient for specific coordinates.
11 /// <glm/gtx/gradient_paint.hpp> need to be included to use these functionalities.
12 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 #include "../gtx/optimum_pow.hpp"
18 
19 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
20 #	pragma message("GLM: GLM_GTX_gradient_paint extension included")
21 #endif
22 
23 namespace glm
24 {
25 	/// @addtogroup gtx_gradient_paint
26 	/// @{
27 
28 	/// Return a color from a radial gradient.
29 	/// @see - gtx_gradient_paint
30 	template <typename T, precision P>
31 	GLM_FUNC_DECL T radialGradient(
32 		tvec2<T, P> const & Center,
33 		T const & Radius,
34 		tvec2<T, P> const & Focal,
35 		tvec2<T, P> const & Position);
36 
37 	/// Return a color from a linear gradient.
38 	/// @see - gtx_gradient_paint
39 	template <typename T, precision P>
40 	GLM_FUNC_DECL T linearGradient(
41 		tvec2<T, P> const & Point0,
42 		tvec2<T, P> const & Point1,
43 		tvec2<T, P> const & Position);
44 
45 	/// @}
46 }// namespace glm
47 
48 #include "gradient_paint.inl"
49