Panda3D
|
The base class for a family of intervals that linearly interpolate one or more numeric values over time. More...
#include "cLerpInterval.h"
Public Types | |
enum | BlendType { BT_no_blend, BT_ease_in, BT_ease_out, BT_ease_in_out, BT_invalid } |
Public Member Functions | |
CLerpInterval (const string &name, double duration, BlendType blend_type) | |
virtual TypeHandle | force_init_type () |
BlendType | get_blend_type () const |
Returns the blend type specified for the interval. | |
virtual TypeHandle | get_type () const |
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. | |
static BlendType | string_blend_type (const string &blend_type) |
Returns the BlendType enumerated value corresponding to the indicated string, or BT_invalid if the string doesn't match anything. | |
Protected Member Functions | |
double | compute_delta (double t) const |
Given a t value in the range [0, get_duration()], returns the corresponding delta value clamped to the range [0, 1], after scaling by duration and applying the blend type. |
The base class for a family of intervals that linearly interpolate one or more numeric values over time.
Definition at line 27 of file cLerpInterval.h.
double CLerpInterval::compute_delta | ( | double | t | ) | const [protected] |
Given a t value in the range [0, get_duration()], returns the corresponding delta value clamped to the range [0, 1], after scaling by duration and applying the blend type.
Definition at line 51 of file cLerpInterval.cxx.
References CInterval::get_duration().
Referenced by CLerpAnimEffectInterval::priv_step(), and CLerpNodePathInterval::priv_step().
CLerpInterval::BlendType CLerpInterval::get_blend_type | ( | ) | const [inline] |
Returns the blend type specified for the interval.
This controls how the linear interpolation behaves near the beginning and end of the lerp period.
Definition at line 37 of file cLerpInterval.I.
static void CLerpInterval::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 CInterval.
Reimplemented in CLerpAnimEffectInterval, and CLerpNodePathInterval.
Definition at line 57 of file cLerpInterval.h.
References CInterval::init_type().
Referenced by CLerpNodePathInterval::init_type(), and CLerpAnimEffectInterval::init_type().
CLerpInterval::BlendType CLerpInterval::string_blend_type | ( | const string & | blend_type | ) | [static] |
Returns the BlendType enumerated value corresponding to the indicated string, or BT_invalid if the string doesn't match anything.
Definition at line 28 of file cLerpInterval.cxx.