00001 // Filename: load_egg_file.h 00002 // Created by: drose (26Feb02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef LOAD_EGG_FILE_H 00016 #define LOAD_EGG_FILE_H 00017 00018 #include "pandabase.h" 00019 00020 #include "pandaNode.h" 00021 #include "coordinateSystem.h" 00022 #include "eggData.h" 00023 00024 class BamCacheRecord; 00025 00026 BEGIN_PUBLISH 00027 //////////////////////////////////////////////////////////////////// 00028 // Function: load_egg_file 00029 // Description: A convenience function; the primary interface to this 00030 // package. Loads up the indicated egg file, and 00031 // returns the root of a scene graph. Returns NULL if 00032 // the file cannot be read for some reason. 00033 // 00034 // Also see the EggLoader class, which can exercise a 00035 // bit more manual control over the loading process. 00036 //////////////////////////////////////////////////////////////////// 00037 EXPCL_PANDAEGG PT(PandaNode) 00038 load_egg_file(const Filename &filename, CoordinateSystem cs = CS_default, 00039 BamCacheRecord *record = NULL); 00040 00041 //////////////////////////////////////////////////////////////////// 00042 // Function: load_egg_data 00043 // Description: Another convenience function; works like 00044 // load_egg_file() but starts from an already-filled 00045 // EggData structure. The structure is destroyed in the 00046 // loading. 00047 //////////////////////////////////////////////////////////////////// 00048 EXPCL_PANDAEGG PT(PandaNode) 00049 load_egg_data(EggData *data, CoordinateSystem cs = CS_default); 00050 END_PUBLISH 00051 00052 #endif