00001 // Filename: characterSlider.cxx 00002 // Created by: drose (03Mar99) 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 "characterSlider.h" 00020 #include <datagram.h> 00021 #include <datagramIterator.h> 00022 #include <bamReader.h> 00023 #include <bamWriter.h> 00024 00025 TypeHandle CharacterSlider::_type_handle; 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Function: CharacterSlider::Default Constructor 00029 // Access: Protected 00030 // Description: For internal use only. 00031 //////////////////////////////////////////////////////////////////// 00032 CharacterSlider:: 00033 CharacterSlider() { 00034 } 00035 00036 //////////////////////////////////////////////////////////////////// 00037 // Function: CharacterSlider::Copy Constructor 00038 // Access: Protected 00039 // Description: 00040 //////////////////////////////////////////////////////////////////// 00041 CharacterSlider:: 00042 CharacterSlider(const CharacterSlider ©) : 00043 MovingPartScalar(copy) 00044 { 00045 } 00046 00047 //////////////////////////////////////////////////////////////////// 00048 // Function: CharacterSlider::Constructor 00049 // Access: Public 00050 // Description: 00051 //////////////////////////////////////////////////////////////////// 00052 CharacterSlider:: 00053 CharacterSlider(PartGroup *parent, const string &name) 00054 : MovingPartScalar(parent, name) { 00055 } 00056 00057 //////////////////////////////////////////////////////////////////// 00058 // Function: CharacterSlider::make_copy 00059 // Access: Public, Virtual 00060 // Description: Allocates and returns a new copy of the node. 00061 // Children are not copied, but see copy_subgraph(). 00062 //////////////////////////////////////////////////////////////////// 00063 PartGroup *CharacterSlider:: 00064 make_copy() const { 00065 return new CharacterSlider(*this); 00066 } 00067 00068 //////////////////////////////////////////////////////////////////// 00069 // Function: CharacterSlider::make_CharacterSlider 00070 // Access: Protected 00071 // Description: Factory method to generate a CharacterSlider object 00072 //////////////////////////////////////////////////////////////////// 00073 TypedWritable* CharacterSlider:: 00074 make_CharacterSlider(const FactoryParams ¶ms) 00075 { 00076 CharacterSlider *me = new CharacterSlider; 00077 DatagramIterator scan; 00078 BamReader *manager; 00079 00080 parse_params(params, scan, manager); 00081 me->fillin(scan, manager); 00082 return me; 00083 } 00084 00085 //////////////////////////////////////////////////////////////////// 00086 // Function: CharacterSlider::register_with_factory 00087 // Access: Public, Static 00088 // Description: Factory method to generate a CharacterSlider object 00089 //////////////////////////////////////////////////////////////////// 00090 void CharacterSlider:: 00091 register_with_read_factory(void) 00092 { 00093 BamReader::get_factory()->register_factory(get_class_type(), make_CharacterSlider); 00094 } 00095 00096 00097 00098