#include <cassert>#include <deque>#include <vector>#include <numeric>Include dependency graph for kino_plugin_utility.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Namespaces | |
| namespace | kino |
Functions | |
| template<typename ArgType> | |
| ArgType | clamp (const ArgType A, const ArgType MinVal, const ArgType MaxVal) |
| Clamps the input value to the range [MinVal, MaxVal]. | |
| template<typename ArgType> | |
| ArgType | lerp (const ArgType A, const ArgType B, const double Mix) |
| Linear interpolation between two values. | |
| double | step (const double Edge, const double A) |
| double | linearstep (const double Edge1, const double Edge2, const double A) |
| double | smoothstep (const double Edge1, const double Edge2, const double A) |
| double | pulse (const double Edge1, const double Edge2, const double A) |
| double | factorial (const unsigned int X) |
|
||||||||||||||||||||
|
Clamps the input value to the range [MinVal, MaxVal].
Definition at line 33 of file kino_plugin_utility.h. Referenced by kino::color_traits< uint8_t >::convert(). 00034 {
00035 return std::min(std::max(A, MinVal), MaxVal);
00036 }
|
|
|
Definition at line 79 of file kino_plugin_utility.h. 00080 {
00081 double result = 1;
00082
00083 for(unsigned int i = 2; i <= X; ++i)
00084 result *= i;
00085
00086 return result;
00087 }
|
|
||||||||||||||||||||
|
Linear interpolation between two values.
Definition at line 40 of file kino_plugin_utility.h. 00041 {
00042 return static_cast<ArgType>(A * (1.0 - Mix) + B * Mix);
00043 }
|
|
||||||||||||||||
|
Definition at line 50 of file kino_plugin_utility.h. 00051 {
00052 if(A < Edge1)
00053 return 0.0;
00054
00055 if(A >= Edge2)
00056 return 1.0;
00057
00058 return (A - Edge1) / (Edge2 - Edge1);
00059 }
|
|
||||||||||||||||
|
Definition at line 74 of file kino_plugin_utility.h. References kino::step().
|
|
||||||||||||||||
|
Definition at line 61 of file kino_plugin_utility.h. 00062 {
00063 if(A < Edge1)
00064 return 0.0;
00065
00066 if(A >= Edge2)
00067 return 1.0;
00068
00069 double a = (A - Edge1) / (Edge2 - Edge1);
00070
00071 return (a * a * (3 - 2 * a));
00072 }
|
|
||||||||||||
|
Definition at line 45 of file kino_plugin_utility.h. Referenced by kino::pulse(). 00046 {
00047 return A < Edge ? 0.0 : 1.0;
00048 }
|
1.4.2