# ColorInterpolationManager

from pandac.PandaModules import ColorInterpolationManager

Class : ColorInterpolationManager
Description : High level class for color interpolation. Segments must be added to the manager in order to achieve results using the "add_*****()" functions. Access to these segments is provided but not necessary general use.

## Inheritance:

ColorInterpolationManager: ReferenceCount
ReferenceCount:

## Methods of ColorInterpolationManager:

addConstant
addLinear
addSinusoid
addStepwave
clearSegment
clearToInitial
getSegment
getSegmentIdList
setDefaultColor

## Methods of ReferenceCount:

getClassType
getRefCount
ref
testRefCountIntegrity
unref

addConstant int ColorInterpolationManager::add_constant(float const time_begin = (0), float const time_end = (1), LVecBase4f const color = ((Colorf(1, 1, 1, 1)))); Description : Adds a constant segment of the specified color to the manager and returns the segment's id as known by the manager.

addLinear int ColorInterpolationManager::add_linear(float const time_begin = (0), float const time_end = (1), LVecBase4f const color_a = ((Colorf(1, 0, 0, 1))), LVecBase4f const color_b = ((Colorf(0, 1, 0, 1)))); Description : Adds a linear segment between two colors to the manager and returns the segment's id as known by the manager.

addSinusoid int ColorInterpolationManager::add_sinusoid(float const time_begin = (0), float const time_end = (1), LVecBase4f const color_a = ((Colorf(1, 0, 0, 1))), LVecBase4f const color_b = ((Colorf(0, 1, 0, 1))), float const period = (1)); Description : Adds a stepwave segment of two colors and a specified period to the manager and returns the segment's id as known by the manager.

addStepwave int ColorInterpolationManager::add_stepwave(float const time_begin = (0), float const time_end = (1), LVecBase4f const color_a = ((Colorf(1, 0, 0, 1))), LVecBase4f const color_b = ((Colorf(0, 1, 0, 1))), float const width_a = (0.5), float const width_b = (0.5)); Description : Adds a stepwave segment of two colors to the manager and returns the segment's id as known by the manager.

clearSegment void ColorInterpolationManager::clear_segment(int const seg_id); Description : Removes the segment of 'id' from the manager.

clearToInitial void ColorInterpolationManager::clear_to_initial(void); Description : Removes all segments from the manager.

getSegment ColorInterpolationSegment *ColorInterpolationManager::get_segment(int const seg_id); Description : Returns the segment that corresponds to 'seg_id'.

getSegmentIdList string ColorInterpolationManager::get_segment_id_list(void); Description : Returns a space delimited list of all of the ids in the manager at the time.

setDefaultColor void ColorInterpolationManager::set_default_color(LVecBase4f const &c); Description : Sets the color to used if no segments are present

getClassType static TypeHandle ReferenceCount::get_class_type(void); Undocumented function.

getRefCount int ReferenceCount::get_ref_count(void) const; Description: Returns the current reference count.

ref void ReferenceCount::ref(void) const; Description: Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

testRefCountIntegrity bool ReferenceCount::test_ref_count_integrity(void) const; Description: Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise.

unref bool ReferenceCount::unref(void) const; Description: Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete(). User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is true if the new reference count is nonzero, false if it is zero.