Panda3D

eggSAnimData.I

00001 // Filename: eggSAnimData.I
00002 // Created by:  drose (19Feb99)
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 ////////////////////////////////////////////////////////////////////
00017 //     Function: EggSAnimData::Constructor
00018 //       Access: Public
00019 //  Description:
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE EggSAnimData::
00022 EggSAnimData(const string &name) : EggAnimData(name) {
00023 }
00024 
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //     Function: EggSAnimData::Copy constructor
00028 //       Access: Public
00029 //  Description:
00030 ////////////////////////////////////////////////////////////////////
00031 INLINE EggSAnimData::
00032 EggSAnimData(const EggSAnimData &copy) : EggAnimData(copy) {
00033 }
00034 
00035 
00036 ////////////////////////////////////////////////////////////////////
00037 //     Function: EggSAnimData::Copy assignment operator
00038 //       Access: Public
00039 //  Description:
00040 ////////////////////////////////////////////////////////////////////
00041 INLINE EggSAnimData &EggSAnimData::
00042 operator = (const EggSAnimData &copy) {
00043   EggAnimData::operator = (copy);
00044 
00045   return *this;
00046 }
00047 
00048 
00049 ////////////////////////////////////////////////////////////////////
00050 //     Function: EggSAnimData::get_num_rows
00051 //       Access: Public
00052 //  Description: Returns the number of rows in the table.  For an
00053 //               SAnim table, each row has one column.
00054 ////////////////////////////////////////////////////////////////////
00055 INLINE int EggSAnimData::
00056 get_num_rows() const {
00057   return get_size();
00058 }
00059 
00060 
00061 ////////////////////////////////////////////////////////////////////
00062 //     Function: EggSAnimData::get_value
00063 //       Access: Public
00064 //  Description: Returns the value at the indicated row.  Row must be
00065 //               in the range 0 <= row < get_num_rows().
00066 ////////////////////////////////////////////////////////////////////
00067 INLINE double EggSAnimData::
00068 get_value(int row) const {
00069   nassertr(row >= 0 && row < get_num_rows(), 0.0);
00070   return _data[row];
00071 }
00072 
00073 
00074 ////////////////////////////////////////////////////////////////////
00075 //     Function: EggSAnimData::set_value
00076 //       Access: Public
00077 //  Description: Changes the value at the indicated row.  Row must be
00078 //               in the range 0 <= row < get_num_rows().
00079 ////////////////////////////////////////////////////////////////////
00080 INLINE void EggSAnimData::
00081 set_value(int row, double value) {
00082   nassertv(row >= 0 && row < get_num_rows());
00083   _data[row] = value;
00084 }
00085 
00086 
 All Classes Functions Variables Enumerations