00001 // Filename: eggSAnimData.I 00002 // Created by: drose (19Feb99) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 00020 //////////////////////////////////////////////////////////////////// 00021 // Function: EggSAnimData::Constructor 00022 // Access: Public 00023 // Description: 00024 //////////////////////////////////////////////////////////////////// 00025 INLINE EggSAnimData:: 00026 EggSAnimData(const string &name) : EggAnimData(name) { 00027 } 00028 00029 00030 //////////////////////////////////////////////////////////////////// 00031 // Function: EggSAnimData::Copy constructor 00032 // Access: Public 00033 // Description: 00034 //////////////////////////////////////////////////////////////////// 00035 INLINE EggSAnimData:: 00036 EggSAnimData(const EggSAnimData ©) : EggAnimData(copy) { 00037 } 00038 00039 00040 //////////////////////////////////////////////////////////////////// 00041 // Function: EggSAnimData::Copy assignment operator 00042 // Access: Public 00043 // Description: 00044 //////////////////////////////////////////////////////////////////// 00045 INLINE EggSAnimData &EggSAnimData:: 00046 operator = (const EggSAnimData ©) { 00047 EggAnimData::operator = (copy); 00048 00049 return *this; 00050 } 00051 00052 00053 //////////////////////////////////////////////////////////////////// 00054 // Function: EggSAnimData::get_num_rows 00055 // Access: Public 00056 // Description: Returns the number of rows in the table. For an 00057 // SAnim table, each row has one column. 00058 //////////////////////////////////////////////////////////////////// 00059 INLINE int EggSAnimData:: 00060 get_num_rows() const { 00061 return get_size(); 00062 } 00063 00064 00065 //////////////////////////////////////////////////////////////////// 00066 // Function: EggSAnimData::get_value 00067 // Access: Public 00068 // Description: Returns the value at the indicated row. Row must be 00069 // in the range 0 <= row < get_num_rows(). 00070 //////////////////////////////////////////////////////////////////// 00071 INLINE double EggSAnimData:: 00072 get_value(int row) const { 00073 nassertr(row >= 0 && row < get_num_rows(), 0.0); 00074 return _data[row]; 00075 } 00076 00077 00078 //////////////////////////////////////////////////////////////////// 00079 // Function: EggSAnimData::set_value 00080 // Access: Public 00081 // Description: Changes the value at the indicated row. Row must be 00082 // in the range 0 <= row < get_num_rows(). 00083 //////////////////////////////////////////////////////////////////// 00084 INLINE void EggSAnimData:: 00085 set_value(int row, double value) { 00086 nassertv(row >= 0 && row < get_num_rows()); 00087 _data[row] = value; 00088 } 00089 00090