Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
ColorInterpolationFunctionLinear Class Reference

Defines a linear interpolation over the lifetime of the segment. More...

#include "colorInterpolationManager.h"

Inheritance diagram for ColorInterpolationFunctionLinear:
ColorInterpolationFunctionConstant ColorInterpolationFunction TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase ColorInterpolationFunctionSinusoid ColorInterpolationFunctionStepwave

List of all members.

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

Detailed Description

Defines a linear interpolation over the lifetime of the segment.

Definition at line 106 of file colorInterpolationManager.h.


Constructor & Destructor Documentation

default constructor

Definition at line 83 of file colorInterpolationManager.cxx.

constructor

Definition at line 94 of file colorInterpolationManager.cxx.


Member Function Documentation

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.

Sets the secondary color of the function.

Definition at line 57 of file colorInterpolationManager.I.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations