0.9.9 API documenation: gradient_paint.hpp Source File

| 0.9.9 API documenation

- Main Page
- Modules
- Files

- File List

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 experimetal 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, precision P>
35 GLM_FUNC_DECL T radialGradient(
36 tvec2<T, P> const & Center,
37 T const & Radius,
38 tvec2<T, P> const & Focal,
39 tvec2<T, P> const & Position);
40
43 template <typename T, precision P>
44 GLM_FUNC_DECL T linearGradient(
45 tvec2<T, P> const & Point0,
46 tvec2<T, P> const & Point1,
47 tvec2<T, P> const & Position);
48
50 }// namespace glm
51
52 #include "gradient_paint.inl"
glm::linearGradient
GLM_FUNC_DECL T linearGradient(tvec2< T, P > const &Point0, tvec2< T, P > const &Point1, tvec2< T, P > const &Position)
Return a color from a linear gradient.
glm::radialGradient
GLM_FUNC_DECL T radialGradient(tvec2< T, P > const &Center, T const &Radius, tvec2< T, P > const &Focal, tvec2< T, P > const &Position)
Return a color from a radial gradient.
glm
Definition: _noise.hpp:11