Panda3D
Loading...
Searching...
No Matches
animBundle.I
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file animBundle.I
10 * @author drose
11 * @date 1999-02-21
12 */
13
14/**
15 *
16 */
17INLINE AnimBundle::
18AnimBundle(const std::string &name, PN_stdfloat fps, int num_frames) : AnimGroup(name) {
19 _fps = fps;
20 _num_frames = num_frames;
21 _root = this;
22}
23
24/**
25 *
26 */
27INLINE AnimBundle::
28AnimBundle() {
29}
30
31/**
32 * Returns the ideal number of frames per second of the animation, when it is
33 * running at normal speed. This may not be the same as the actual playing
34 * frame rate, as it might have been adjusted through set_play_rate() on the
35 * AnimControl object. See AnimControl::get_effective_frame_rate().
36 */
37INLINE double AnimBundle::
38get_base_frame_rate() const {
39 return _fps;
40}
41
42/**
43 * Returns the number of frames of animation, or 0 if the animation has no
44 * fixed number of frames.
45 */
46INLINE int AnimBundle::
47get_num_frames() const {
48 return _num_frames;
49}
get_base_frame_rate
Returns the ideal number of frames per second of the animation, when it is running at normal speed.
Definition animBundle.h:41
get_num_frames
Returns the number of frames of animation, or 0 if the animation has no fixed number of frames.
Definition animBundle.h:42
This is the base class for AnimChannel and AnimBundle.
Definition animGroup.h:33