Panda3D
|
00001 // Filename: loaderFileTypeEgg.cxx 00002 // Created by: drose (20Jun00) 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 #include "loaderFileTypeEgg.h" 00016 #include "load_egg_file.h" 00017 00018 #include "eggData.h" 00019 00020 TypeHandle LoaderFileTypeEgg::_type_handle; 00021 00022 //////////////////////////////////////////////////////////////////// 00023 // Function: LoaderFileTypeEgg::Constructor 00024 // Access: Public 00025 // Description: 00026 //////////////////////////////////////////////////////////////////// 00027 LoaderFileTypeEgg:: 00028 LoaderFileTypeEgg() { 00029 } 00030 00031 //////////////////////////////////////////////////////////////////// 00032 // Function: LoaderFileTypeEgg::get_name 00033 // Access: Public, Virtual 00034 // Description: 00035 //////////////////////////////////////////////////////////////////// 00036 string LoaderFileTypeEgg:: 00037 get_name() const { 00038 return "Egg"; 00039 } 00040 00041 //////////////////////////////////////////////////////////////////// 00042 // Function: LoaderFileTypeEgg::get_extension 00043 // Access: Public, Virtual 00044 // Description: 00045 //////////////////////////////////////////////////////////////////// 00046 string LoaderFileTypeEgg:: 00047 get_extension() const { 00048 return "egg"; 00049 } 00050 00051 //////////////////////////////////////////////////////////////////// 00052 // Function: LoaderFileTypeEgg::supports_compressed 00053 // Access: Published, Virtual 00054 // Description: Returns true if this file type can transparently load 00055 // compressed files (with a .pz extension), false 00056 // otherwise. 00057 //////////////////////////////////////////////////////////////////// 00058 bool LoaderFileTypeEgg:: 00059 supports_compressed() const { 00060 return true; 00061 } 00062 00063 //////////////////////////////////////////////////////////////////// 00064 // Function: LoaderFileTypeEgg::load_file 00065 // Access: Public, Virtual 00066 // Description: 00067 //////////////////////////////////////////////////////////////////// 00068 PT(PandaNode) LoaderFileTypeEgg:: 00069 load_file(const Filename &path, const LoaderOptions &, 00070 BamCacheRecord *record) const { 00071 PT(PandaNode) result = load_egg_file(path, CS_default, record); 00072 return result; 00073 }