Panda3D
eggSAnimData.h
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.h
10  * @author drose
11  * @date 1999-02-19
12  */
13 
14 #ifndef EGGSANIMDATA_H
15 #define EGGSANIMDATA_H
16 
17 #include "pandabase.h"
18 
19 #include "eggAnimData.h"
20 
21 /**
22  * Corresponding to an <S$Anim> entry, this stores a single column of numbers,
23  * for instance for a morph target, or as one column in an EggXfmSAnim.
24  */
25 class EXPCL_PANDA_EGG EggSAnimData : public EggAnimData {
26 PUBLISHED:
27  INLINE explicit EggSAnimData(const std::string &name = "");
28  INLINE EggSAnimData(const EggSAnimData &copy);
29  INLINE EggSAnimData &operator = (const EggSAnimData &copy);
30 
31  INLINE int get_num_rows() const;
32  INLINE double get_value(int row) const;
33  INLINE void set_value(int row, double value);
34 
35  void optimize();
36 
37  virtual void write(std::ostream &out, int indent_level) const;
38 
39 public:
40 
41  static TypeHandle get_class_type() {
42  return _type_handle;
43  }
44  static void init_type() {
45  EggAnimData::init_type();
46  register_type(_type_handle, "EggSAnimData",
47  EggAnimData::get_class_type());
48  }
49  virtual TypeHandle get_type() const {
50  return get_class_type();
51  }
52  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
53 
54 private:
55  static TypeHandle _type_handle;
56 };
57 
58 #include "eggSAnimData.I"
59 
60 #endif
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Corresponding to an <S$Anim> entry, this stores a single column of numbers, for instance for a morph ...
Definition: eggSAnimData.h:25
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A base class for EggSAnimData and EggXfmAnimData, which contain rows and columns of numbers.
Definition: eggAnimData.h:30
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81