Panda3D

eggAnimPreload.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 eggAnimPreload.h
10 * @author drose
11 * @date 2008-08-06
12 */
13
14 #ifndef EGGANIMPRELOAD_H
15 #define EGGANIMPRELOAD_H
16
17 #include "pandabase.h"
18
19 #include "eggNode.h"
20
21 /**
22 * This corresponds to an <AnimPreload> entry.
23 */
24 class EXPCL_PANDA_EGG EggAnimPreload : public EggNode {
25 PUBLISHED:
26 INLINE explicit EggAnimPreload(const std::string &name = "");
27 INLINE EggAnimPreload(const EggAnimPreload &copy);
28 INLINE EggAnimPreload &operator = (const EggAnimPreload &copy);
29
30 INLINE void set_fps(double fps);
31 INLINE void clear_fps();
32 INLINE bool has_fps() const;
33 INLINE double get_fps() const;
34
35 INLINE void set_num_frames(int num_frames);
36 INLINE void clear_num_frames();
37 INLINE bool has_num_frames() const;
38 INLINE int get_num_frames() const;
39
40 MAKE_PROPERTY2(fps, has_fps, get_fps, set_fps, clear_fps);
41 MAKE_PROPERTY2(num_frames, has_num_frames, get_num_frames, set_num_frames, clear_num_frames);
42
43 virtual void write(std::ostream &out, int indent_level) const;
44
45 private:
46 double _fps;
47 bool _has_fps;
48 int _num_frames;
49 bool _has_num_frames;
50
51 public:
52 static TypeHandle get_class_type() {
53 return _type_handle;
54 }
55 static void init_type() {
56 EggNode::init_type();
57 register_type(_type_handle, "EggAnimPreload",
58 EggNode::get_class_type());
59 }
60 virtual TypeHandle get_type() const {
61 return get_class_type();
62 }
63 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
64
65 private:
66 static TypeHandle _type_handle;
67 };
68
69 #include "eggAnimPreload.I"
70
71 #endif
EggAnimPreload
This corresponds to an <AnimPreload> entry.
Definition: eggAnimPreload.h:24
EggNode
A base class for things that may be directly added into the egg hierarchy.
Definition: eggNode.h:36
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
eggAnimPreload.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
eggNode.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
register_type
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