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

panda/src/chan/animBundleNode.h

Go to the documentation of this file.
00001 // Filename: animBundleNode.h
00002 // Created by:  drose (06Mar02)
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 #ifndef ANIMBUNDLENODE_H
00020 #define ANIMBUNDLENODE_H
00021 
00022 #include "pandabase.h"
00023 
00024 #include "animBundle.h"
00025 
00026 #include "pandaNode.h"
00027 #include "dcast.h"
00028 
00029 ////////////////////////////////////////////////////////////////////
00030 //       Class : AnimBundleNode
00031 // Description : This is a node that contains a pointer to an
00032 //               AnimBundle.  Like AnimBundleNode, it exists solely to
00033 //               make it easy to store AnimBundles in the scene graph.
00034 ////////////////////////////////////////////////////////////////////
00035 class EXPCL_PANDA AnimBundleNode : public PandaNode {
00036 public:
00037   INLINE AnimBundleNode(const string &name, AnimBundle *bundle);
00038 
00039 protected:
00040   INLINE AnimBundleNode();
00041   INLINE AnimBundleNode(const AnimBundleNode &copy);
00042 
00043 public:
00044   virtual bool safe_to_flatten() const;
00045 
00046 PUBLISHED:
00047   INLINE AnimBundle *get_bundle() const;
00048 
00049 private:
00050   PT(AnimBundle) _bundle;
00051 
00052 public:
00053   static void register_with_read_factory();
00054   virtual void write_datagram(BamWriter* manager, Datagram &me);
00055   virtual int complete_pointers(TypedWritable **p_list,
00056                                 BamReader *manager);
00057 
00058 protected:
00059   static TypedWritable *make_from_bam(const FactoryParams &params);
00060   void fillin(DatagramIterator& scan, BamReader* manager);
00061 
00062 public:
00063   virtual TypeHandle get_type() const {
00064     return get_class_type();
00065   }
00066   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00067   static TypeHandle get_class_type() {
00068     return _type_handle;
00069   }
00070   static void init_type() {
00071     PandaNode::init_type();
00072     register_type(_type_handle, "AnimBundleNode",
00073                   PandaNode::get_class_type());
00074   }
00075 
00076 private:
00077   static TypeHandle _type_handle;
00078 };
00079 
00080 #include "animBundleNode.I"
00081 
00082 #endif

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