25 if (blend_type ==
"easeIn") {
27 }
else if (blend_type ==
"easeOut") {
29 }
else if (blend_type ==
"easeInOut") {
30 return BT_ease_in_out;
31 }
else if (blend_type ==
"noBlend") {
43 double CLerpInterval::
44 compute_delta(
double t)
const {
45 double duration = get_duration();
46 if (duration == 0.0) {
52 t = std::min(std::max(t, 0.0), 1.0);
54 switch (_blend_type) {
58 return ((3.0 * t2) - (t2 * t)) * 0.5;
64 return ((3.0 * t) - (t2 * t)) * 0.5;
70 return (3.0 * t2) - (2.0 * t * t2);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static BlendType string_blend_type(const std::string &blend_type)
Returns the BlendType enumerated value corresponding to the indicated string, or BT_invalid if the st...
TypeHandle is the identifier used to differentiate C++ class types.