Panda3D
cLerpAnimEffectInterval.I
1 // Filename: cLerpAnimEffectInterval.I
2 // Created by: drose (27Aug02)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: CLerpAnimEffectInterval::Constructor
18 // Access: Published
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE CLerpAnimEffectInterval::
22 CLerpAnimEffectInterval(const string &name, double duration,
23  CLerpInterval::BlendType blend_type) :
24  CLerpInterval(name, duration, blend_type)
25 {
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: CLerpAnimEffectInterval::add_control
30 // Access: Published
31 // Description: Adds another AnimControl to the list of AnimControls
32 // affected by the lerp. This control will be lerped
33 // from begin_effect to end_effect over the period of
34 // the lerp.
35 //
36 // The AnimControl name parameter is only used when
37 // formatting the interval for output.
38 ////////////////////////////////////////////////////////////////////
39 INLINE void CLerpAnimEffectInterval::
40 add_control(AnimControl *control, const string &name,
41  float begin_effect, float end_effect) {
42  _controls.push_back(ControlDef(control, name, begin_effect, end_effect));
43 }
44 
45 ////////////////////////////////////////////////////////////////////
46 // Function: CLerpAnimEffectInterval::ControlDef::Constructor
47 // Access: Public
48 // Description:
49 ////////////////////////////////////////////////////////////////////
50 INLINE CLerpAnimEffectInterval::ControlDef::
51 ControlDef(AnimControl *control, const string &name,
52  float begin_effect, float end_effect) :
53  _control(control),
54  _name(name),
55  _begin_effect(begin_effect),
56  _end_effect(end_effect)
57 {
58 }
void add_control(AnimControl *control, const string &name, float begin_effect, float end_effect)
Adds another AnimControl to the list of AnimControls affected by the lerp.
Controls the timing of a character animation.
Definition: animControl.h:41
The base class for a family of intervals that linearly interpolate one or more numeric values over ti...
Definition: cLerpInterval.h:27