Panda3D
 All Classes Functions Variables Enumerations
animBundle.I
1 // Filename: animBundle.I
2 // Created by: drose (21Feb99)
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 // Function: AnimBundle::Constructor
17 // Access: Public
18 // Description:
19 ////////////////////////////////////////////////////////////////////
20 INLINE AnimBundle::
21 AnimBundle(const string &name, PN_stdfloat fps, int num_frames) : AnimGroup(name) {
22  _fps = fps;
23  _num_frames = num_frames;
24  _root = this;
25 }
26 
27 ////////////////////////////////////////////////////////////////////
28 // Function: AnimBundle::Constructor
29 // Access: Public
30 // Description:
31 ////////////////////////////////////////////////////////////////////
32 INLINE AnimBundle::
33 AnimBundle() {
34 }
35 
36 ////////////////////////////////////////////////////////////////////
37 // Function: AnimBundle::get_base_frame_rate
38 // Access: Public
39 // Description: Returns the ideal number of frames per second of the
40 // animation, when it is running at normal speed. This
41 // may not be the same as the actual playing frame rate,
42 // as it might have been adjusted through
43 // set_play_rate() on the AnimControl object. See
44 // AnimControl::get_effective_frame_rate().
45 ////////////////////////////////////////////////////////////////////
46 INLINE double AnimBundle::
48  return _fps;
49 }
50 
51 ////////////////////////////////////////////////////////////////////
52 // Function: AnimBundle::get_num_frames
53 // Access: Public
54 // Description: Returns the number of frames of animation, or 0 if
55 // the animation has no fixed number of frames.
56 ////////////////////////////////////////////////////////////////////
57 INLINE int AnimBundle::
58 get_num_frames() const {
59  return _num_frames;
60 }
61 
62 
This is the base class for AnimChannel and AnimBundle.
Definition: animGroup.h:36
int get_num_frames() const
Returns the number of frames of animation, or 0 if the animation has no fixed number of frames...
Definition: animBundle.I:58
double get_base_frame_rate() const
Returns the ideal number of frames per second of the animation, when it is running at normal speed...
Definition: animBundle.I:47