Panda3D
Loading...
Searching...
No Matches
eggPoolUniquifier.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 eggPoolUniquifier.h
10 * @author drose
11 * @date 2000-11-09
12 */
13
14#ifndef EGGPOOLUNIQUIFIER_H
15#define EGGPOOLUNIQUIFIER_H
16
17#include "pandabase.h"
18
19#include "eggNameUniquifier.h"
20
21/**
22 * This is a specialization of EggNameUniquifier to generate unique names for
23 * textures, materials, and vertex pools prior to writing out an egg file.
24 * It's automatically called by EggData prior to writing out an egg file.
25 */
26class EXPCL_PANDA_EGG EggPoolUniquifier : public EggNameUniquifier {
27PUBLISHED:
29
30 virtual std::string get_category(EggNode *node);
31
32public:
33 static TypeHandle get_class_type() {
34 return _type_handle;
35 }
36 static void init_type() {
37 EggNameUniquifier::init_type();
38 register_type(_type_handle, "EggPoolUniquifier",
39 EggNameUniquifier::get_class_type());
40 }
41 virtual TypeHandle get_type() const {
42 return get_class_type();
43 }
44 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
45
46private:
47 static TypeHandle _type_handle;
48
49};
50
51#endif
This is a handy class for guaranteeing unique node names in an egg hierarchy.
A base class for things that may be directly added into the egg hierarchy.
Definition eggNode.h:36
This is a specialization of EggNameUniquifier to generate unique names for textures,...
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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(),...