Panda3D
eggPoolUniquifier.h
1 // Filename: eggPoolUniquifier.h
2 // Created by: drose (09Nov00)
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 EGGPOOLUNIQUIFIER_H
16 #define EGGPOOLUNIQUIFIER_H
17 
18 #include "pandabase.h"
19 
20 #include "eggNameUniquifier.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : EggPoolUniquifier
24 // Description : This is a specialization of EggNameUniquifier to
25 // generate unique names for textures, materials, and
26 // vertex pools prior to writing out an egg file. It's
27 // automatically called by EggData prior to writing out
28 // an egg file.
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDAEGG EggPoolUniquifier : public EggNameUniquifier {
31 PUBLISHED:
33 
34  virtual string get_category(EggNode *node);
35 
36 public:
37  static TypeHandle get_class_type() {
38  return _type_handle;
39  }
40  static void init_type() {
41  EggNameUniquifier::init_type();
42  register_type(_type_handle, "EggPoolUniquifier",
43  EggNameUniquifier::get_class_type());
44  }
45  virtual TypeHandle get_type() const {
46  return get_class_type();
47  }
48  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
49 
50 private:
51  static TypeHandle _type_handle;
52 
53 };
54 
55 #endif
56 
57 
This is a handy class for guaranteeing unique node names in an egg hierarchy.
This is a specialization of EggNameUniquifier to generate unique names for textures, materials, and vertex pools prior to writing out an egg file.
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