Panda3D
 All Classes Functions Variables Enumerations
eggAnimData.h
1 // Filename: eggAnimData.h
2 // Created by: drose (19Feb99)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef EGGANIMDATA_H
16 #define EGGANIMDATA_H
17 
18 #include "pandabase.h"
19 
20 #include "eggNode.h"
21 
22 #include "pointerToArray.h"
23 #include "pta_double.h"
24 
25 #include <math.h>
26 
27 ////////////////////////////////////////////////////////////////////
28 // Class : EggAnimData
29 // Description : A base class for EggSAnimData and EggXfmAnimData,
30 // which contain rows and columns of numbers.
31 ////////////////////////////////////////////////////////////////////
32 class EXPCL_PANDAEGG EggAnimData : public EggNode {
33 PUBLISHED:
34 
35  INLINE EggAnimData(const string &name = "");
36  INLINE EggAnimData(const EggAnimData &copy);
37  INLINE EggAnimData &operator = (const EggAnimData &copy);
38 
39  INLINE void set_fps(double type);
40  INLINE void clear_fps();
41  INLINE bool has_fps() const;
42  INLINE double get_fps() const;
43 
44  INLINE void clear_data();
45  INLINE void add_data(double value);
46 
47  INLINE int get_size() const;
48 
49 public:
50  INLINE PTA_double get_data() const;
51  INLINE void set_data(const PTA_double &data);
52 
53 PUBLISHED:
54  void quantize(double quantum);
55 
56 protected:
57  PTA_double _data;
58 
59 private:
60  double _fps;
61  bool _has_fps;
62 
63 
64 public:
65 
66  static TypeHandle get_class_type() {
67  return _type_handle;
68  }
69  static void init_type() {
70  EggNode::init_type();
71  register_type(_type_handle, "EggAnimData",
72  EggNode::get_class_type());
73  }
74  virtual TypeHandle get_type() const {
75  return get_class_type();
76  }
77  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
78 
79 private:
80  static TypeHandle _type_handle;
81 };
82 
83 #include "eggAnimData.I"
84 
85 #endif
A base class for EggSAnimData and EggXfmAnimData, which contain rows and columns of numbers...
Definition: eggAnimData.h:32
A base class for things that may be directly added into the egg hierarchy.
Definition: eggNode.h:38
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85