Panda3D
eggSAnimData.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 eggSAnimData.I
10  * @author drose
11  * @date 1999-02-19
12  */
13 
14 /**
15  *
16  */
17 INLINE EggSAnimData::
18 EggSAnimData(const std::string &name) : EggAnimData(name) {
19 }
20 
21 
22 /**
23  *
24  */
25 INLINE EggSAnimData::
26 EggSAnimData(const EggSAnimData &copy) : EggAnimData(copy) {
27 }
28 
29 
30 /**
31  *
32  */
33 INLINE EggSAnimData &EggSAnimData::
34 operator = (const EggSAnimData &copy) {
35  EggAnimData::operator = (copy);
36 
37  return *this;
38 }
39 
40 
41 /**
42  * Returns the number of rows in the table. For an SAnim table, each row has
43  * one column.
44  */
45 INLINE int EggSAnimData::
46 get_num_rows() const {
47  return get_size();
48 }
49 
50 
51 /**
52  * Returns the value at the indicated row. Row must be in the range 0 <= row
53  * < get_num_rows().
54  */
55 INLINE double EggSAnimData::
56 get_value(int row) const {
57  nassertr(row >= 0 && row < get_num_rows(), 0.0);
58  return _data[row];
59 }
60 
61 
62 /**
63  * Changes the value at the indicated row. Row must be in the range 0 <= row
64  * < get_num_rows().
65  */
66 INLINE void EggSAnimData::
67 set_value(int row, double value) {
68  nassertv(row >= 0 && row < get_num_rows());
69  _data[row] = value;
70 }
void set_value(int row, double value)
Changes the value at the indicated row.
Definition: eggSAnimData.I:67
Corresponding to an <S$Anim> entry, this stores a single column of numbers, for instance for a morph ...
Definition: eggSAnimData.h:25
double get_value(int row) const
Returns the value at the indicated row.
Definition: eggSAnimData.I:56
int get_size() const
Returns the number of elements in the table.
Definition: eggAnimData.I:107
A base class for EggSAnimData and EggXfmAnimData, which contain rows and columns of numbers.
Definition: eggAnimData.h:30
int get_num_rows() const
Returns the number of rows in the table.
Definition: eggSAnimData.I:46