Panda3D
 All Classes Functions Variables Enumerations
animBundle.I
00001 // Filename: animBundle.I
00002 // Created by:  drose (21Feb99)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 ////////////////////////////////////////////////////////////////////
00016 //     Function: AnimBundle::Constructor
00017 //       Access: Public
00018 //  Description:
00019 ////////////////////////////////////////////////////////////////////
00020 INLINE AnimBundle::
00021 AnimBundle(const string &name, PN_stdfloat fps, int num_frames) : AnimGroup(name) {
00022   _fps = fps;
00023   _num_frames = num_frames;
00024   _root = this;
00025 }
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //     Function: AnimBundle::Constructor
00029 //       Access: Public
00030 //  Description:
00031 ////////////////////////////////////////////////////////////////////
00032 INLINE AnimBundle::
00033 AnimBundle() {
00034 }
00035 
00036 ////////////////////////////////////////////////////////////////////
00037 //     Function: AnimBundle::get_base_frame_rate
00038 //       Access: Public
00039 //  Description: Returns the ideal number of frames per second of the
00040 //               animation, when it is running at normal speed.  This
00041 //               may not be the same as the actual playing frame rate,
00042 //               as it might have been adjusted through
00043 //               set_play_rate() on the AnimControl object.  See
00044 //               AnimControl::get_effective_frame_rate().
00045 ////////////////////////////////////////////////////////////////////
00046 INLINE double AnimBundle::
00047 get_base_frame_rate() const {
00048   return _fps;
00049 }
00050 
00051 ////////////////////////////////////////////////////////////////////
00052 //     Function: AnimBundle::get_num_frames
00053 //       Access: Public
00054 //  Description: Returns the number of frames of animation, or 0 if
00055 //               the animation has no fixed number of frames.
00056 ////////////////////////////////////////////////////////////////////
00057 INLINE int AnimBundle::
00058 get_num_frames() const {
00059   return _num_frames;
00060 }
00061 
00062 
 All Classes Functions Variables Enumerations