Panda3D
panda
src
egg
eggPoolUniquifier.cxx
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.cxx
10
* @author drose
11
* @date 2000-11-09
12
*/
13
14
#include "
eggPoolUniquifier.h
"
15
#include "
eggNode.h
"
16
#include "
eggTexture.h
"
17
#include "
eggMaterial.h
"
18
#include "
eggVertexPool.h
"
19
20
#include "
pnotify.h
"
21
22
TypeHandle
EggPoolUniquifier::_type_handle;
23
24
25
/**
26
*
27
*/
28
EggPoolUniquifier::
29
EggPoolUniquifier() {
30
}
31
32
/**
33
* Returns the category name into which the given node should be collected, or
34
* the empty string if the node's name should be left alone.
35
*/
36
std::string
EggPoolUniquifier::
37
get_category
(
EggNode
*node) {
38
if
(node->
is_of_type
(EggTexture::get_class_type())) {
39
return
"tex"
;
40
}
else
if
(node->
is_of_type
(EggMaterial::get_class_type())) {
41
return
"mat"
;
42
}
else
if
(node->
is_of_type
(EggVertexPool::get_class_type())) {
43
return
"vpool"
;
44
}
45
46
return
std::string();
47
}
EggPoolUniquifier::get_category
virtual std::string get_category(EggNode *node)
Returns the category name into which the given node should be collected, or the empty string if the n...
Definition:
eggPoolUniquifier.cxx:37
pnotify.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
eggMaterial.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
eggNode.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
EggNode
A base class for things that may be directly added into the egg hierarchy.
Definition:
eggNode.h:35
TypedObject::is_of_type
bool is_of_type(TypeHandle handle) const
Returns true if the current object is or derives from the indicated type.
Definition:
typedObject.I:28
eggTexture.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
eggPoolUniquifier.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition:
typeHandle.h:81
eggVertexPool.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Generated on Wed Jan 23 2019 21:39:58 for Panda3D by
1.8.15