Panda3D
|
Defines a discrete cyclical transition between two colors. More...
#include "colorInterpolationManager.h"
Public Member Functions | |
ColorInterpolationFunctionStepwave () | |
default constructor | |
ColorInterpolationFunctionStepwave (const LColor &color_a, const LColor &color_b, const PN_stdfloat width_a, const PN_stdfloat width_b) | |
constructor | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
PN_stdfloat | get_width_a () const |
Returns the primary width of the function. | |
PN_stdfloat | get_width_b () const |
Returns the secondary width of the function. | |
void | set_width_a (const PN_stdfloat w) |
Sets the primary width of the function. | |
void | set_width_b (const PN_stdfloat 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 | |
LColor | interpolate (const PN_stdfloat t=0) const |
Returns either A or B. | |
Protected Attributes | |
PN_stdfloat | _w_a |
PN_stdfloat | _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 LColor & | color_a, |
const LColor & | color_b, | ||
const PN_stdfloat | width_a, | ||
const PN_stdfloat | width_b | ||
) |
constructor
Definition at line 130 of file colorInterpolationManager.cxx.
PN_stdfloat ColorInterpolationFunctionStepwave::get_width_a | ( | ) | const [inline] |
Returns the primary width of the function.
Definition at line 68 of file colorInterpolationManager.I.
PN_stdfloat 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.
LColor ColorInterpolationFunctionStepwave::interpolate | ( | const PN_stdfloat | 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 PN_stdfloat | w | ) | [inline] |
Sets the primary width of the function.
Definition at line 90 of file colorInterpolationManager.I.
void ColorInterpolationFunctionStepwave::set_width_b | ( | const PN_stdfloat | w | ) | [inline] |
Sets the secondary width of the function.
Definition at line 101 of file colorInterpolationManager.I.