Panda3D
 All Classes Functions Variables Enumerations
eggPoolUniquifier.cxx
00001 // Filename: eggPoolUniquifier.cxx
00002 // Created by:  drose (09Nov00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #include "eggPoolUniquifier.h"
00016 #include "eggNode.h"
00017 #include "eggTexture.h"
00018 #include "eggMaterial.h"
00019 #include "eggVertexPool.h"
00020 
00021 #include "pnotify.h"
00022 
00023 TypeHandle EggPoolUniquifier::_type_handle;
00024 
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //     Function: EggPoolUniquifier::Constructor
00028 //       Access: Public
00029 //  Description:
00030 ////////////////////////////////////////////////////////////////////
00031 EggPoolUniquifier::
00032 EggPoolUniquifier() {
00033 }
00034 
00035 ////////////////////////////////////////////////////////////////////
00036 //     Function: EggPoolUniquifier::get_category
00037 //       Access: Public
00038 //  Description: Returns the category name into which the given node
00039 //               should be collected, or the empty string if the
00040 //               node's name should be left alone.
00041 ////////////////////////////////////////////////////////////////////
00042 string EggPoolUniquifier::
00043 get_category(EggNode *node) {
00044   if (node->is_of_type(EggTexture::get_class_type())) {
00045     return "tex";
00046   } else if (node->is_of_type(EggMaterial::get_class_type())) {
00047     return "mat";
00048   } else if (node->is_of_type(EggVertexPool::get_class_type())) {
00049     return "vpool";
00050   }
00051 
00052   return string();
00053 }
 All Classes Functions Variables Enumerations