Panda3D
|
Defines a linear interpolation over the lifetime of the segment. More...
#include "colorInterpolationManager.h"
Public Member Functions | |
ColorInterpolationFunctionLinear () | |
default constructor | |
ColorInterpolationFunctionLinear (const LColor &color_a, const LColor &color_b) | |
constructor | |
virtual TypeHandle | force_init_type () |
LColor | get_color_b () const |
Returns the secondary color of the function. | |
virtual TypeHandle | get_type () const |
void | set_color_b (const LColor &c) |
Sets the secondary color 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 the linear mixture of A and B according to 't'. | |
Protected Attributes | |
LColor | _c_b |
Defines a linear interpolation over the lifetime of the segment.
Definition at line 106 of file colorInterpolationManager.h.
default constructor
Definition at line 83 of file colorInterpolationManager.cxx.
ColorInterpolationFunctionLinear::ColorInterpolationFunctionLinear | ( | const LColor & | color_a, |
const LColor & | color_b | ||
) |
constructor
Definition at line 94 of file colorInterpolationManager.cxx.
LColor ColorInterpolationFunctionLinear::get_color_b | ( | ) | const [inline] |
Returns the secondary color of the function.
Definition at line 46 of file colorInterpolationManager.I.
static void ColorInterpolationFunctionLinear::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 ColorInterpolationFunctionConstant.
Reimplemented in ColorInterpolationFunctionSinusoid, and ColorInterpolationFunctionStepwave.
Definition at line 127 of file colorInterpolationManager.h.
LColor ColorInterpolationFunctionLinear::interpolate | ( | const PN_stdfloat | t = 0 | ) | const [protected, virtual] |
Returns the linear mixture of A and B according to 't'.
Reimplemented from ColorInterpolationFunctionConstant.
Reimplemented in ColorInterpolationFunctionSinusoid, and ColorInterpolationFunctionStepwave.
Definition at line 107 of file colorInterpolationManager.cxx.
void ColorInterpolationFunctionLinear::set_color_b | ( | const LColor & | c | ) | [inline] |
Sets the secondary color of the function.
Definition at line 57 of file colorInterpolationManager.I.