Panda3D
|
Defines a discrete cyclical transition between two colors. More...
#include "colorInterpolationManager.h"
Public Member Functions | |
ColorInterpolationFunctionStepwave () | |
default constructor | |
ColorInterpolationFunctionStepwave (const Colorf color_a, const Colorf color_b, const float width_a, const float width_b) | |
constructor | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
float | get_width_a () const |
Returns the primary width of the function. | |
float | get_width_b () const |
Returns the secondary width of the function. | |
void | set_width_a (const float w) |
Sets the primary width of the function. | |
void | set_width_b (const float w) |
Sets the secondary width of the function. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
Protected Member Functions | |
Colorf | interpolate (const float t=0) const |
Returns either A or B. | |
Protected Attributes | |
float | _w_a |
float | _w_b |
Defines a discrete cyclical transition between two colors.
The widths describe a portion of the segment's lifetime for which the corresponding color should be selected. If their sum is less than 1, the function repeats until the end of the segment.
Definition at line 150 of file colorInterpolationManager.h.
ColorInterpolationFunctionStepwave::ColorInterpolationFunctionStepwave | ( | ) |
default constructor
Definition at line 118 of file colorInterpolationManager.cxx.
ColorInterpolationFunctionStepwave::ColorInterpolationFunctionStepwave | ( | const Colorf | color_a, |
const Colorf | color_b, | ||
const float | width_a, | ||
const float | width_b | ||
) |
constructor
Definition at line 130 of file colorInterpolationManager.cxx.
float ColorInterpolationFunctionStepwave::get_width_a | ( | ) | const [inline] |
Returns the primary width of the function.
Definition at line 68 of file colorInterpolationManager.I.
float ColorInterpolationFunctionStepwave::get_width_b | ( | ) | const [inline] |
Returns the secondary width of the function.
Definition at line 79 of file colorInterpolationManager.I.
static void ColorInterpolationFunctionStepwave::init_type | ( | ) | [inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from ColorInterpolationFunctionLinear.
Definition at line 174 of file colorInterpolationManager.h.
Colorf ColorInterpolationFunctionStepwave::interpolate | ( | const float | t = 0 | ) | const [protected, virtual] |
Returns either A or B.
Reimplemented from ColorInterpolationFunctionLinear.
Definition at line 146 of file colorInterpolationManager.cxx.
void ColorInterpolationFunctionStepwave::set_width_a | ( | const float | w | ) | [inline] |
Sets the primary width of the function.
Definition at line 90 of file colorInterpolationManager.I.
void ColorInterpolationFunctionStepwave::set_width_b | ( | const float | w | ) | [inline] |
Sets the secondary width of the function.
Definition at line 101 of file colorInterpolationManager.I.