00001 // Filename: eggPoolUniquifier.cxx 00002 // Created by: drose (09Nov00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #include "eggPoolUniquifier.h" 00020 #include "eggNode.h" 00021 #include "eggTexture.h" 00022 #include "eggMaterial.h" 00023 #include "eggVertexPool.h" 00024 00025 #include <notify.h> 00026 00027 TypeHandle EggPoolUniquifier::_type_handle; 00028 00029 00030 //////////////////////////////////////////////////////////////////// 00031 // Function: EggPoolUniquifier::Constructor 00032 // Access: Public 00033 // Description: 00034 //////////////////////////////////////////////////////////////////// 00035 EggPoolUniquifier:: 00036 EggPoolUniquifier() { 00037 } 00038 00039 //////////////////////////////////////////////////////////////////// 00040 // Function: EggPoolUniquifier::get_category 00041 // Access: Public 00042 // Description: Returns the category name into which the given node 00043 // should be collected, or the empty string if the 00044 // node's name should be left alone. 00045 //////////////////////////////////////////////////////////////////// 00046 string EggPoolUniquifier:: 00047 get_category(EggNode *node) { 00048 if (node->is_of_type(EggTexture::get_class_type())) { 00049 return "tex"; 00050 } else if (node->is_of_type(EggMaterial::get_class_type())) { 00051 return "mat"; 00052 } else if (node->is_of_type(EggVertexPool::get_class_type())) { 00053 return "vpool"; 00054 } 00055 00056 return string(); 00057 }