00001 // Filename: characterJointBundle.cxx 00002 // Created by: drose (23Feb99) 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 "characterJointBundle.h" 00020 #include "datagram.h" 00021 #include "datagramIterator.h" 00022 #include "bamReader.h" 00023 #include "bamWriter.h" 00024 00025 TypeHandle CharacterJointBundle::_type_handle; 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Function: CharacterJointBundle::Constructor 00029 // Access: Public 00030 // Description: 00031 //////////////////////////////////////////////////////////////////// 00032 CharacterJointBundle:: 00033 CharacterJointBundle(const string &name) : PartBundle(name) { 00034 } 00035 00036 //////////////////////////////////////////////////////////////////// 00037 // Function: CharacterJointBundle::make_copy 00038 // Access: Public, Virtual 00039 // Description: Allocates and returns a new copy of the node. 00040 // Children are not copied, but see copy_subgraph(). 00041 //////////////////////////////////////////////////////////////////// 00042 PartGroup *CharacterJointBundle:: 00043 make_copy() const { 00044 return new CharacterJointBundle(*this); 00045 } 00046 00047 //////////////////////////////////////////////////////////////////// 00048 // Function: CharacterJointBundle::make_CharacterJointBundle 00049 // Access: Protected 00050 // Description: Factory method to generate a CharacterJointBundle object 00051 //////////////////////////////////////////////////////////////////// 00052 TypedWritable* CharacterJointBundle:: 00053 make_CharacterJointBundle(const FactoryParams ¶ms) 00054 { 00055 CharacterJointBundle *me = new CharacterJointBundle; 00056 DatagramIterator scan; 00057 BamReader *manager; 00058 00059 parse_params(params, scan, manager); 00060 me->fillin(scan, manager); 00061 manager->register_finalize(me); 00062 return me; 00063 } 00064 00065 //////////////////////////////////////////////////////////////////// 00066 // Function: CharacterJointBundle::register_with_factory 00067 // Access: Public, Static 00068 // Description: Factory method to generate a CharacterJointBundle object 00069 //////////////////////////////////////////////////////////////////// 00070 void CharacterJointBundle:: 00071 register_with_read_factory(void) 00072 { 00073 BamReader::get_factory()->register_factory(get_class_type(), make_CharacterJointBundle); 00074 } 00075