Panda3D
Loading...
Searching...
No Matches
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 */
17INLINE EggSAnimData::
18EggSAnimData(const std::string &name) : EggAnimData(name) {
19}
20
21
22/**
23 *
24 */
25INLINE EggSAnimData::
26EggSAnimData(const EggSAnimData &copy) : EggAnimData(copy) {
27}
28
29
30/**
31 *
32 */
33INLINE EggSAnimData &EggSAnimData::
34operator = (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 */
46get_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 */
55INLINE double EggSAnimData::
56get_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 */
66INLINE void EggSAnimData::
67set_value(int row, double value) {
68 nassertv(row >= 0 && row < get_num_rows());
69 _data[row] = value;
70}
A base class for EggSAnimData and EggXfmAnimData, which contain rows and columns of numbers.
Definition eggAnimData.h:30
int get_size() const
Returns the number of elements in the table.
Corresponding to an entry, this stores a single column of numbers, for instance for a morph target,...
double get_value(int row) const
Returns the value at the indicated row.
int get_num_rows() const
Returns the number of rows in the table.
void set_value(int row, double value)
Changes the value at the indicated row.