Panda3D
 All Classes Functions Variables Enumerations
eggAnimPreload.h
1 // Filename: eggAnimPreload.h
2 // Created by: drose (06Aug08)
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 EGGANIMPRELOAD_H
16 #define EGGANIMPRELOAD_H
17 
18 #include "pandabase.h"
19 
20 #include "eggNode.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : EggAnimPreload
24 // Description : This corresponds to an <AnimPreload> entry.
25 ////////////////////////////////////////////////////////////////////
26 class EXPCL_PANDAEGG EggAnimPreload : public EggNode {
27 PUBLISHED:
28  INLINE EggAnimPreload(const string &name = "");
29  INLINE EggAnimPreload(const EggAnimPreload &copy);
30  INLINE EggAnimPreload &operator = (const EggAnimPreload &copy);
31 
32  INLINE void set_fps(double fps);
33  INLINE void clear_fps();
34  INLINE bool has_fps() const;
35  INLINE double get_fps() const;
36 
37  INLINE void set_num_frames(int num_frames);
38  INLINE void clear_num_frames();
39  INLINE bool has_num_frames() const;
40  INLINE int get_num_frames() const;
41 
42  virtual void write(ostream &out, int indent_level) const;
43 
44 private:
45  double _fps;
46  bool _has_fps;
47  int _num_frames;
48  bool _has_num_frames;
49 
50 public:
51  static TypeHandle get_class_type() {
52  return _type_handle;
53  }
54  static void init_type() {
55  EggNode::init_type();
56  register_type(_type_handle, "EggAnimPreload",
57  EggNode::get_class_type());
58  }
59  virtual TypeHandle get_type() const {
60  return get_class_type();
61  }
62  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
63 
64 private:
65  static TypeHandle _type_handle;
66 };
67 
68 #include "eggAnimPreload.I"
69 
70 #endif
71 
This corresponds to an &lt;AnimPreload&gt; entry.
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