00001 // Filename: cLerpAnimEffectInterval.I 00002 // Created by: drose (27Aug02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 00020 //////////////////////////////////////////////////////////////////// 00021 // Function: CLerpAnimEffectInterval::Constructor 00022 // Access: Published 00023 // Description: 00024 //////////////////////////////////////////////////////////////////// 00025 INLINE CLerpAnimEffectInterval:: 00026 CLerpAnimEffectInterval(const string &name, double duration, 00027 CLerpInterval::BlendType blend_type) : 00028 CLerpInterval(name, duration, blend_type) 00029 { 00030 } 00031 00032 //////////////////////////////////////////////////////////////////// 00033 // Function: CLerpAnimEffectInterval::add_control 00034 // Access: Published 00035 // Description: Adds another AnimControl to the list of AnimControls 00036 // affected by the lerp. This control will be lerped 00037 // from begin_effect to end_effect over the period of 00038 // the lerp. 00039 // 00040 // The AnimControl name parameter is only used when 00041 // formatting the interval for output. 00042 //////////////////////////////////////////////////////////////////// 00043 INLINE void CLerpAnimEffectInterval:: 00044 add_control(AnimControl *control, const string &name, 00045 float begin_effect, float end_effect) { 00046 _controls.push_back(ControlDef(control, name, begin_effect, end_effect)); 00047 } 00048 00049 //////////////////////////////////////////////////////////////////// 00050 // Function: CLerpAnimEffectInterval::ControlDef::Constructor 00051 // Access: Public 00052 // Description: 00053 //////////////////////////////////////////////////////////////////// 00054 INLINE CLerpAnimEffectInterval::ControlDef:: 00055 ControlDef(AnimControl *control, const string &name, 00056 float begin_effect, float end_effect) : 00057 _control(control), 00058 _name(name), 00059 _begin_effect(begin_effect), 00060 _end_effect(end_effect) 00061 { 00062 }