0.9.9 API documenation
gradient_paint.hpp
Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 #include "../gtx/optimum_pow.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "GLM: GLM_GTX_gradient_paint 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 #endif
22 
23 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTX_gradient_paint extension included")
25 #endif
26 
27 namespace glm
28 {
31 
34  template<typename T, qualifier P>
35  GLM_FUNC_DECL T radialGradient(
36  vec<2, T, P> const & Center,
37  T const & Radius,
38  vec<2, T, P> const & Focal,
39  vec<2, T, P> const & Position);
40 
43  template<typename T, qualifier P>
44  GLM_FUNC_DECL T linearGradient(
45  vec<2, T, P> const & Point0,
46  vec<2, T, P> const & Point1,
47  vec<2, T, P> const & Position);
48 
50 }// namespace glm
51 
52 #include "gradient_paint.inl"
Definition: _noise.hpp:11
GLM_FUNC_DECL T radialGradient(vec< 2, T, P > const &Center, T const &Radius, vec< 2, T, P > const &Focal, vec< 2, T, P > const &Position)
Return a color from a radial gradient.
GLM_FUNC_DECL T linearGradient(vec< 2, T, P > const &Point0, vec< 2, T, P > const &Point1, vec< 2, T, P > const &Position)
Return a color from a linear gradient.