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

panda/src/pgraph/modelRoot.h

Go to the documentation of this file.
00001 // Filename: modelRoot.h
00002 // Created by:  drose (16Mar02)
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 MODELROOT_H
00020 #define MODELROOT_H
00021 
00022 #include "pandabase.h"
00023 
00024 #include "modelNode.h"
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //       Class : ModelRoot
00028 // Description : A node of this type is created automatically at the
00029 //               root of each model file that is loaded.  It may
00030 //               eventually contain some information about the
00031 //               contents of the model; at the moment, it contains no
00032 //               special information, but can be used as a flag to
00033 //               indicate the presence of a loaded model file.
00034 ////////////////////////////////////////////////////////////////////
00035 class EXPCL_PANDA ModelRoot : public ModelNode {
00036 PUBLISHED:
00037   INLINE ModelRoot(const string &name );
00038 
00039 protected:
00040   INLINE ModelRoot(const ModelRoot &copy);
00041 
00042 public:
00043   virtual PandaNode *make_copy() const;
00044 
00045 public:
00046   static void register_with_read_factory();
00047   virtual void write_datagram(BamWriter *manager, Datagram &dg);
00048 
00049 protected:
00050   static TypedWritable *make_from_bam(const FactoryParams &params);
00051   void fillin(DatagramIterator &scan, BamReader *manager);
00052 
00053 public:
00054   static TypeHandle get_class_type() {
00055     return _type_handle;
00056   }
00057   static void init_type() {
00058     ModelNode::init_type();
00059     register_type(_type_handle, "ModelRoot",
00060                   ModelNode::get_class_type());
00061   }
00062   virtual TypeHandle get_type(void) const {
00063     return get_class_type();
00064   }
00065   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00066 
00067 private:
00068   static TypeHandle _type_handle;
00069 };
00070 
00071 #include "modelRoot.I"
00072 
00073 #endif
00074 
00075 

Generated on Fri May 2 00:41:54 2003 for Panda by doxygen1.3