Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/chan/animChannelBase.cxx

Go to the documentation of this file.
00001 // Filename: animChannelBase.cxx
00002 // Created by:  drose (19Feb99)
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 
00020 #include "animChannelBase.h"
00021 #include <datagram.h>
00022 #include <datagramIterator.h>
00023 #include <bamReader.h>
00024 #include <bamWriter.h>
00025 
00026 TypeHandle AnimChannelBase::_type_handle;
00027 
00028 
00029 ////////////////////////////////////////////////////////////////////
00030 //     Function: AnimChannelBase::has_changed
00031 //       Access: Public, Virtual
00032 //  Description: Returns true if the value has changed since the last
00033 //               call to has_changed().  last_frame is the frame
00034 //               number of the last call; this_frame is the current
00035 //               frame number.
00036 ////////////////////////////////////////////////////////////////////
00037 bool AnimChannelBase::
00038 has_changed(int, int) {
00039   return true;
00040 }
00041 
00042 ////////////////////////////////////////////////////////////////////
00043 //     Function: AnimChannelBase::output
00044 //       Access: Public, Virtual
00045 //  Description: Writes a one-line description of the channel.
00046 ////////////////////////////////////////////////////////////////////
00047 void AnimChannelBase::
00048 output(ostream &out) const {
00049   out << get_type() << "(" << get_value_type() << ") " << get_name();
00050 }
00051 
00052 ////////////////////////////////////////////////////////////////////
00053 //     Function: AnimChannelBase::write_datagram
00054 //       Access: Public
00055 //  Description: Function to write the important information in
00056 //               the particular object to a Datagram
00057 ////////////////////////////////////////////////////////////////////
00058 void AnimChannelBase::
00059 write_datagram(BamWriter *manager, Datagram &me)
00060 {
00061   AnimGroup::write_datagram(manager, me);
00062   me.add_uint16(_last_frame);
00063 }
00064 
00065 ////////////////////////////////////////////////////////////////////
00066 //     Function: AnimChannelBase::fillin
00067 //       Access: Protected
00068 //  Description: Function that reads out of the datagram (or asks
00069 //               manager to read) all of the data that is needed to
00070 //               re-create this object and stores it in the appropiate
00071 //               place
00072 ////////////////////////////////////////////////////////////////////
00073 void AnimChannelBase::
00074 fillin(DatagramIterator& scan, BamReader* manager)
00075 {
00076   AnimGroup::fillin(scan, manager);
00077   _last_frame = scan.get_uint16();
00078 }
00079 
00080 

Generated on Fri May 2 00:34:56 2003 for Panda by doxygen1.3