Panda3D
eggBin.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 eggBin.h
10  * @author drose
11  * @date 1999-01-21
12  */
13 
14 #ifndef EGGBIN_H
15 #define EGGBIN_H
16 
17 #include "pandabase.h"
18 
19 #include "eggGroup.h"
20 
21 /**
22  * A type of group node that holds related subnodes. This is a special kind
23  * of node that will never be read in from an egg file, but can only exist in
24  * the egg scene graph if it is created via the use of an EggBinMaker.
25  */
26 class EXPCL_PANDA_EGG EggBin : public EggGroup {
27 PUBLISHED:
28  explicit EggBin(const std::string &name = "");
29  EggBin(const EggGroup &copy);
30  EggBin(const EggBin &copy);
31 
32  void set_bin_number(int bin_number);
33  int get_bin_number() const;
34 
35 private:
36  int _bin_number;
37 
38 
39 public:
40  static TypeHandle get_class_type() {
41  return _type_handle;
42  }
43  static void init_type() {
44  EggGroup::init_type();
45  register_type(_type_handle, "EggBin",
46  EggGroup::get_class_type());
47  }
48  virtual TypeHandle get_type() const {
49  return get_class_type();
50  }
51  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
52 
53 private:
54  static TypeHandle _type_handle;
55 };
56 
57 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
The main glue of the egg hierarchy, this corresponds to the <Group>, <Instance>, and <Joint> type nod...
Definition: eggGroup.h:34
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
A type of group node that holds related subnodes.
Definition: eggBin.h:26